Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/libkern.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | static __inline __uintmax_t ummin(__uintmax_t a, __uintmax_t b) | ||||
return (a < b ? a : b); | return (a < b ? a : b); | ||||
} | } | ||||
static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); } | static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); } | ||||
static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); } | static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); } | ||||
static __inline int abs(int a) { return (a < 0 ? -a : a); } | static __inline int abs(int a) { return (a < 0 ? -a : a); } | ||||
static __inline long labs(long a) { return (a < 0 ? -a : a); } | static __inline long labs(long a) { return (a < 0 ? -a : a); } | ||||
static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); } | static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); } | ||||
#ifndef RANDOM_FENESTRASX | |||||
#define ARC4_ENTR_NONE 0 /* Don't have entropy yet. */ | #define ARC4_ENTR_NONE 0 /* Don't have entropy yet. */ | ||||
#define ARC4_ENTR_HAVE 1 /* Have entropy. */ | #define ARC4_ENTR_HAVE 1 /* Have entropy. */ | ||||
#define ARC4_ENTR_SEED 2 /* Reseeding. */ | #define ARC4_ENTR_SEED 2 /* Reseeding. */ | ||||
extern int arc4rand_iniseed_state; | extern int arc4rand_iniseed_state; | ||||
#endif | |||||
/* Prototypes for non-quad routines. */ | /* Prototypes for non-quad routines. */ | ||||
struct malloc_type; | struct malloc_type; | ||||
uint32_t arc4random(void); | uint32_t arc4random(void); | ||||
void arc4random_buf(void *, size_t); | void arc4random_buf(void *, size_t); | ||||
uint32_t arc4random_uniform(uint32_t); | uint32_t arc4random_uniform(uint32_t); | ||||
void arc4rand(void *, u_int, int); | void arc4rand(void *, u_int, int); | ||||
int timingsafe_bcmp(const void *, const void *, size_t); | int timingsafe_bcmp(const void *, const void *, size_t); | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |