X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fsorter%2Fs-fixint.h;h=1020c26e6997b32cec5228ebfc21004597a48d57;hb=6912c77a66798de162fe31f79581cd7b5c97f12c;hp=26edaf5fa51e8007719763a6039b44c914ebbc05;hpb=fa7aa6d9457616ce28f97c83eaa616d0ff276870;p=libucw.git diff --git a/ucw/sorter/s-fixint.h b/ucw/sorter/s-fixint.h index 26edaf5f..1020c26e 100644 --- a/ucw/sorter/s-fixint.h +++ b/ucw/sorter/s-fixint.h @@ -41,14 +41,14 @@ static size_t P(internal_workspace)(void) return workspace; } -static uns P(internal_num_keys)(struct sort_context *ctx) +static uint P(internal_num_keys)(struct sort_context *ctx) { size_t bufsize = ctx->big_buf_size; size_t workspace = P(internal_workspace)(); if (workspace) bufsize -= CPU_PAGE_SIZE; u64 maxkeys = bufsize / (sizeof(P(key)) + workspace); - return MIN(maxkeys, ~0U); // The number of records must fit in uns + return MIN(maxkeys, ~0U); // The number of records must fit in uint } static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct sort_bucket *bout, struct sort_bucket *bout_only) @@ -56,10 +56,10 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct sorter_alloc_buf(ctx); struct fastbuf *in = sbuck_read(bin); P(key) *buf = ctx->big_buf; - uns maxkeys = P(internal_num_keys)(ctx); + uint maxkeys = P(internal_num_keys)(ctx); SORT_XTRACE(5, "s-fixint: Reading (maxkeys=%u, hash_bits=%d)", maxkeys, bin->hash_bits); - uns n = 0; + uint n = 0; while (n < maxkeys && P(read_key)(in, &buf[n])) n++; if (!n) @@ -86,14 +86,14 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct bout = bout_only; struct fastbuf *out = sbuck_write(bout); bout->runs++; - uns merged UNUSED = 0; - for (uns i=0; i