Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 716520 | Differences between
and this patch

Collapse All | Expand All

(-)a/lib/xxhash.c (-9 / +12 lines)
Lines 80-92 void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src) Link Here
80
{
80
{
81
	memcpy(dst, src, sizeof(*dst));
81
	memcpy(dst, src, sizeof(*dst));
82
}
82
}
83
EXPORT_SYMBOL(xxh32_copy_state);
84
83
85
void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src)
84
void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src)
86
{
85
{
87
	memcpy(dst, src, sizeof(*dst));
86
	memcpy(dst, src, sizeof(*dst));
88
}
87
}
89
EXPORT_SYMBOL(xxh64_copy_state);
90
88
91
/*-***************************
89
/*-***************************
92
 * Simple Hash Functions
90
 * Simple Hash Functions
Lines 151-157 uint32_t xxh32(const void *input, const size_t len, const uint32_t seed) Link Here
151
149
152
	return h32;
150
	return h32;
153
}
151
}
154
EXPORT_SYMBOL(xxh32);
155
152
156
static uint64_t xxh64_round(uint64_t acc, const uint64_t input)
153
static uint64_t xxh64_round(uint64_t acc, const uint64_t input)
157
{
154
{
Lines 234-240 uint64_t xxh64(const void *input, const size_t len, const uint64_t seed) Link Here
234
231
235
	return h64;
232
	return h64;
236
}
233
}
237
EXPORT_SYMBOL(xxh64);
238
234
239
/*-**************************************************
235
/*-**************************************************
240
 * Advanced Hash Functions
236
 * Advanced Hash Functions
Lines 251-257 void xxh32_reset(struct xxh32_state *statePtr, const uint32_t seed) Link Here
251
	state.v4 = seed - PRIME32_1;
247
	state.v4 = seed - PRIME32_1;
252
	memcpy(statePtr, &state, sizeof(state));
248
	memcpy(statePtr, &state, sizeof(state));
253
}
249
}
254
EXPORT_SYMBOL(xxh32_reset);
255
250
256
void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed)
251
void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed)
257
{
252
{
Lines 265-271 void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed) Link Here
265
	state.v4 = seed - PRIME64_1;
260
	state.v4 = seed - PRIME64_1;
266
	memcpy(statePtr, &state, sizeof(state));
261
	memcpy(statePtr, &state, sizeof(state));
267
}
262
}
268
EXPORT_SYMBOL(xxh64_reset);
269
263
270
int xxh32_update(struct xxh32_state *state, const void *input, const size_t len)
264
int xxh32_update(struct xxh32_state *state, const void *input, const size_t len)
271
{
265
{
Lines 334-340 int xxh32_update(struct xxh32_state *state, const void *input, const size_t len) Link Here
334
328
335
	return 0;
329
	return 0;
336
}
330
}
337
EXPORT_SYMBOL(xxh32_update);
338
331
339
uint32_t xxh32_digest(const struct xxh32_state *state)
332
uint32_t xxh32_digest(const struct xxh32_state *state)
340
{
333
{
Lines 372-378 uint32_t xxh32_digest(const struct xxh32_state *state) Link Here
372
365
373
	return h32;
366
	return h32;
374
}
367
}
375
EXPORT_SYMBOL(xxh32_digest);
376
368
377
int xxh64_update(struct xxh64_state *state, const void *input, const size_t len)
369
int xxh64_update(struct xxh64_state *state, const void *input, const size_t len)
378
{
370
{
Lines 439-445 int xxh64_update(struct xxh64_state *state, const void *input, const size_t len) Link Here
439
431
440
	return 0;
432
	return 0;
441
}
433
}
442
EXPORT_SYMBOL(xxh64_update);
443
434
444
uint64_t xxh64_digest(const struct xxh64_state *state)
435
uint64_t xxh64_digest(const struct xxh64_state *state)
445
{
436
{
Lines 494-500 uint64_t xxh64_digest(const struct xxh64_state *state) Link Here
494
485
495
	return h64;
486
	return h64;
496
}
487
}
488
489
#ifndef XXH_PREBOOT
490
EXPORT_SYMBOL(xxh32_copy_state);
491
EXPORT_SYMBOL(xxh64_copy_state);
492
EXPORT_SYMBOL(xxh32);
493
EXPORT_SYMBOL(xxh64);
494
EXPORT_SYMBOL(xxh32_reset);
495
EXPORT_SYMBOL(xxh64_reset);
496
EXPORT_SYMBOL(xxh32_update);
497
EXPORT_SYMBOL(xxh32_digest);
498
EXPORT_SYMBOL(xxh64_update);
497
EXPORT_SYMBOL(xxh64_digest);
499
EXPORT_SYMBOL(xxh64_digest);
498
500
499
MODULE_LICENSE("Dual BSD/GPL");
501
MODULE_LICENSE("Dual BSD/GPL");
500
MODULE_DESCRIPTION("xxHash");
502
MODULE_DESCRIPTION("xxHash");
503
#endif

Return to bug 716520