Use ISO C99 integer types in sys/kern where possible.
There are only about 100 occurences of the BSD-specific u_int*_t datatypes in sys/kern. The ISO C99 integer types are used here more often.
This commit is contained in:
parent
c51050129f
commit
60ae52f785
@ -494,7 +494,7 @@ encode_timeval(struct timeval tv)
|
||||
val = 1000000 * tv.tv_sec + tv.tv_usec;
|
||||
} else {
|
||||
exp = log2_s + LOG2_1M - CALC_BITS;
|
||||
val = (unsigned int)(((u_int64_t)1000000 * tv.tv_sec +
|
||||
val = (unsigned int)(((uint64_t)1000000 * tv.tv_sec +
|
||||
tv.tv_usec) >> exp);
|
||||
}
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ static void
|
||||
watchdog_fire(void)
|
||||
{
|
||||
int nintr;
|
||||
u_int64_t inttotal;
|
||||
uint64_t inttotal;
|
||||
u_long *curintr;
|
||||
char *curname;
|
||||
|
||||
|
@ -129,7 +129,7 @@ static int kmemcount;
|
||||
|
||||
#define KMEM_ZMAX PAGE_SIZE
|
||||
#define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT)
|
||||
static u_int8_t kmemsize[KMEM_ZSIZE + 1];
|
||||
static uint8_t kmemsize[KMEM_ZSIZE + 1];
|
||||
|
||||
/*
|
||||
* Small malloc(9) memory allocations are allocated from a set of UMA buckets
|
||||
@ -558,7 +558,7 @@ reallocf(void *addr, unsigned long size, struct malloc_type *mtp, int flags)
|
||||
static void
|
||||
kmeminit(void *dummy)
|
||||
{
|
||||
u_int8_t indx;
|
||||
uint8_t indx;
|
||||
u_long mem_size;
|
||||
int i;
|
||||
|
||||
@ -879,8 +879,8 @@ DB_SHOW_COMMAND(malloc, db_show_malloc)
|
||||
{
|
||||
struct malloc_type_internal *mtip;
|
||||
struct malloc_type *mtp;
|
||||
u_int64_t allocs, frees;
|
||||
u_int64_t alloced, freed;
|
||||
uint64_t allocs, frees;
|
||||
uint64_t alloced, freed;
|
||||
int i;
|
||||
|
||||
db_printf("%18s %12s %12s %12s\n", "Type", "InUse", "MemUse",
|
||||
|
@ -233,7 +233,7 @@ static void mb_zfini_pack(void *, int);
|
||||
|
||||
static void mb_reclaim(void *);
|
||||
static void mbuf_init(void *);
|
||||
static void *mbuf_jumbo_alloc(uma_zone_t, int, u_int8_t *, int);
|
||||
static void *mbuf_jumbo_alloc(uma_zone_t, int, uint8_t *, int);
|
||||
|
||||
/* Ensure that MSIZE doesn't break dtom() - it must be a power of 2 */
|
||||
CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE);
|
||||
@ -350,7 +350,7 @@ mbuf_init(void *dummy)
|
||||
* pages.
|
||||
*/
|
||||
static void *
|
||||
mbuf_jumbo_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
||||
mbuf_jumbo_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait)
|
||||
{
|
||||
|
||||
/* Inform UMA that this allocator uses kernel_map/object. */
|
||||
|
@ -455,9 +455,9 @@ MODULE_VERSION(kernel, __FreeBSD_version);
|
||||
|
||||
typedef union modspecific32 {
|
||||
int intval;
|
||||
u_int32_t uintval;
|
||||
uint32_t uintval;
|
||||
int longval;
|
||||
u_int32_t ulongval;
|
||||
uint32_t ulongval;
|
||||
} modspecific32_t;
|
||||
|
||||
struct module_stat32 {
|
||||
|
@ -851,7 +851,7 @@ calcru1(struct proc *p, struct rusage_ext *ruxp, struct timeval *up,
|
||||
struct timeval *sp)
|
||||
{
|
||||
/* {user, system, interrupt, total} {ticks, usec}: */
|
||||
u_int64_t ut, uu, st, su, it, tt, tu;
|
||||
uint64_t ut, uu, st, su, it, tt, tu;
|
||||
|
||||
ut = ruxp->rux_uticks;
|
||||
st = ruxp->rux_sticks;
|
||||
|
@ -65,7 +65,7 @@ sdt_probe_func_t sdt_probe_func = sdt_probe_stub;
|
||||
* support to enable it.
|
||||
*/
|
||||
void
|
||||
sdt_probe_stub(u_int32_t id, uintptr_t arg0, uintptr_t arg1,
|
||||
sdt_probe_stub(uint32_t id, uintptr_t arg0, uintptr_t arg1,
|
||||
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4)
|
||||
{
|
||||
printf("sdt_probe_stub: Why did this get called?\n");
|
||||
|
@ -51,7 +51,7 @@ struct timehands {
|
||||
/* These fields must be initialized by the driver. */
|
||||
struct timecounter *th_counter;
|
||||
int64_t th_adjustment;
|
||||
u_int64_t th_scale;
|
||||
uint64_t th_scale;
|
||||
u_int th_offset_count;
|
||||
struct bintime th_offset;
|
||||
struct timeval th_microtime;
|
||||
@ -134,7 +134,7 @@ sysctl_kern_timecounter_get(SYSCTL_HANDLER_ARGS)
|
||||
static int
|
||||
sysctl_kern_timecounter_freq(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
u_int64_t freq;
|
||||
uint64_t freq;
|
||||
struct timecounter *tc = arg1;
|
||||
|
||||
freq = tc->tc_frequency;
|
||||
@ -362,7 +362,7 @@ tc_init(struct timecounter *tc)
|
||||
}
|
||||
|
||||
/* Report the frequency of the current timecounter. */
|
||||
u_int64_t
|
||||
uint64_t
|
||||
tc_getfrequency(void)
|
||||
{
|
||||
|
||||
@ -412,7 +412,7 @@ tc_windup(void)
|
||||
{
|
||||
struct bintime bt;
|
||||
struct timehands *th, *tho;
|
||||
u_int64_t scale;
|
||||
uint64_t scale;
|
||||
u_int delta, ncount, ogen;
|
||||
int i;
|
||||
time_t t;
|
||||
@ -507,7 +507,7 @@ tc_windup(void)
|
||||
* to the goddess of code clarity.
|
||||
*
|
||||
*/
|
||||
scale = (u_int64_t)1 << 63;
|
||||
scale = (uint64_t)1 << 63;
|
||||
scale += (th->th_adjustment / 1024) * 2199;
|
||||
scale /= th->th_counter->tc_frequency;
|
||||
th->th_scale = scale * 2;
|
||||
@ -734,7 +734,7 @@ pps_event(struct pps_state *pps, int event)
|
||||
}
|
||||
#ifdef PPS_SYNC
|
||||
if (fhard) {
|
||||
u_int64_t scale;
|
||||
uint64_t scale;
|
||||
|
||||
/*
|
||||
* Feed the NTP PLL/FLL.
|
||||
@ -744,7 +744,7 @@ pps_event(struct pps_state *pps, int event)
|
||||
tcount = pps->capcount - pps->ppscount[2];
|
||||
pps->ppscount[2] = pps->capcount;
|
||||
tcount &= pps->capth->th_counter->tc_counter_mask;
|
||||
scale = (u_int64_t)1 << 63;
|
||||
scale = (uint64_t)1 << 63;
|
||||
scale /= pps->capth->th_counter->tc_frequency;
|
||||
scale *= 2;
|
||||
bt.sec = 0;
|
||||
|
@ -3285,8 +3285,8 @@ freebsd32_umtx_unlock(struct thread *td, struct freebsd32_umtx_unlock_args *uap)
|
||||
}
|
||||
|
||||
struct timespec32 {
|
||||
u_int32_t tv_sec;
|
||||
u_int32_t tv_nsec;
|
||||
uint32_t tv_sec;
|
||||
uint32_t tv_nsec;
|
||||
};
|
||||
|
||||
static inline int
|
||||
|
@ -165,7 +165,7 @@ s/\$//g
|
||||
printf "# created from%s\nMIASM = ", $0 > sysmk
|
||||
|
||||
printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace
|
||||
printf "static void\nsystrace_args(int sysnum, void *params, u_int64_t *uarg, int *n_args)\n{\n" > systrace
|
||||
printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace
|
||||
printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace
|
||||
printf "\tswitch (sysnum) {\n" > systrace
|
||||
|
||||
|
@ -120,7 +120,7 @@ struct device {
|
||||
char* desc; /**< driver specific description */
|
||||
int busy; /**< count of calls to device_busy() */
|
||||
device_state_t state; /**< current device state */
|
||||
u_int32_t devflags; /**< api level flags for device_get_flags() */
|
||||
uint32_t devflags; /**< api level flags for device_get_flags() */
|
||||
u_short flags; /**< internal device flags */
|
||||
#define DF_ENABLED 1 /* device should be probed/attached */
|
||||
#define DF_FIXEDCLASS 2 /* devclass specified at create time */
|
||||
@ -2207,7 +2207,7 @@ device_get_desc(device_t dev)
|
||||
/**
|
||||
* @brief Return the device's flags
|
||||
*/
|
||||
u_int32_t
|
||||
uint32_t
|
||||
device_get_flags(device_t dev)
|
||||
{
|
||||
return (dev->devflags);
|
||||
@ -2315,7 +2315,7 @@ device_set_desc_copy(device_t dev, const char* desc)
|
||||
* @brief Set the device's flags
|
||||
*/
|
||||
void
|
||||
device_set_flags(device_t dev, u_int32_t flags)
|
||||
device_set_flags(device_t dev, uint32_t flags)
|
||||
{
|
||||
dev->devflags = flags;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ static struct devstatlist device_statq;
|
||||
static struct devstat *devstat_alloc(void);
|
||||
static void devstat_free(struct devstat *);
|
||||
static void devstat_add_entry(struct devstat *ds, const void *dev_name,
|
||||
int unit_number, u_int32_t block_size,
|
||||
int unit_number, uint32_t block_size,
|
||||
devstat_support_flags flags,
|
||||
devstat_type_flags device_type,
|
||||
devstat_priority priority);
|
||||
@ -64,7 +64,7 @@ static void devstat_add_entry(struct devstat *ds, const void *dev_name,
|
||||
*/
|
||||
struct devstat *
|
||||
devstat_new_entry(const void *dev_name,
|
||||
int unit_number, u_int32_t block_size,
|
||||
int unit_number, uint32_t block_size,
|
||||
devstat_support_flags flags,
|
||||
devstat_type_flags device_type,
|
||||
devstat_priority priority)
|
||||
@ -99,7 +99,7 @@ devstat_new_entry(const void *dev_name,
|
||||
*/
|
||||
static void
|
||||
devstat_add_entry(struct devstat *ds, const void *dev_name,
|
||||
int unit_number, u_int32_t block_size,
|
||||
int unit_number, uint32_t block_size,
|
||||
devstat_support_flags flags,
|
||||
devstat_type_flags device_type,
|
||||
devstat_priority priority)
|
||||
@ -275,7 +275,7 @@ devstat_start_transaction_bio(struct devstat *ds, struct bio *bp)
|
||||
* atomic instructions using appropriate memory barriers.
|
||||
*/
|
||||
void
|
||||
devstat_end_transaction(struct devstat *ds, u_int32_t bytes,
|
||||
devstat_end_transaction(struct devstat *ds, uint32_t bytes,
|
||||
devstat_tag_type tag_type, devstat_trans_flags flags,
|
||||
struct bintime *now, struct bintime *then)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ static const struct {
|
||||
|
||||
|
||||
void
|
||||
timespec2fattime(struct timespec *tsp, int utc, u_int16_t *ddp, u_int16_t *dtp, u_int8_t *dhp)
|
||||
timespec2fattime(struct timespec *tsp, int utc, uint16_t *ddp, uint16_t *dtp, uint8_t *dhp)
|
||||
{
|
||||
time_t t1;
|
||||
unsigned t2, l, m;
|
||||
@ -263,8 +263,8 @@ main(int argc __unused, char **argv __unused)
|
||||
struct timespec ts;
|
||||
struct tm tm;
|
||||
double a;
|
||||
u_int16_t d, t;
|
||||
u_int8_t p;
|
||||
uint16_t d, t;
|
||||
uint8_t p;
|
||||
char buf[100];
|
||||
|
||||
for (i = 0; i < 10000; i++) {
|
||||
|
@ -139,8 +139,8 @@ struct lock_profile_object {
|
||||
int lpo_line;
|
||||
uint16_t lpo_ref;
|
||||
uint16_t lpo_cnt;
|
||||
u_int64_t lpo_acqtime;
|
||||
u_int64_t lpo_waittime;
|
||||
uint64_t lpo_acqtime;
|
||||
uint64_t lpo_waittime;
|
||||
u_int lpo_contest_locking;
|
||||
};
|
||||
|
||||
@ -199,15 +199,15 @@ static int lock_prof_skipspin;
|
||||
static int lock_prof_skipcount;
|
||||
|
||||
#ifndef USE_CPU_NANOSECONDS
|
||||
u_int64_t
|
||||
uint64_t
|
||||
nanoseconds(void)
|
||||
{
|
||||
struct bintime bt;
|
||||
u_int64_t ns;
|
||||
uint64_t ns;
|
||||
|
||||
binuptime(&bt);
|
||||
/* From bintime2timespec */
|
||||
ns = bt.sec * (u_int64_t)1000000000;
|
||||
ns = bt.sec * (uint64_t)1000000000;
|
||||
ns += ((uint64_t)1000000000 * (uint32_t)(bt.frac >> 32)) >> 32;
|
||||
return (ns);
|
||||
}
|
||||
@ -598,7 +598,7 @@ lock_profile_release_lock(struct lock_object *lo)
|
||||
struct lock_profile_object *l;
|
||||
struct lock_prof_type *type;
|
||||
struct lock_prof *lp;
|
||||
u_int64_t curtime, holdtime;
|
||||
uint64_t curtime, holdtime;
|
||||
struct lpohead *head;
|
||||
int spin;
|
||||
|
||||
|
@ -125,34 +125,34 @@ mb_reserve(struct mbchain *mbp, int size)
|
||||
}
|
||||
|
||||
int
|
||||
mb_put_uint8(struct mbchain *mbp, u_int8_t x)
|
||||
mb_put_uint8(struct mbchain *mbp, uint8_t x)
|
||||
{
|
||||
return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
|
||||
}
|
||||
|
||||
int
|
||||
mb_put_uint16be(struct mbchain *mbp, u_int16_t x)
|
||||
mb_put_uint16be(struct mbchain *mbp, uint16_t x)
|
||||
{
|
||||
x = htobe16(x);
|
||||
return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
|
||||
}
|
||||
|
||||
int
|
||||
mb_put_uint16le(struct mbchain *mbp, u_int16_t x)
|
||||
mb_put_uint16le(struct mbchain *mbp, uint16_t x)
|
||||
{
|
||||
x = htole16(x);
|
||||
return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
|
||||
}
|
||||
|
||||
int
|
||||
mb_put_uint32be(struct mbchain *mbp, u_int32_t x)
|
||||
mb_put_uint32be(struct mbchain *mbp, uint32_t x)
|
||||
{
|
||||
x = htobe32(x);
|
||||
return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
|
||||
}
|
||||
|
||||
int
|
||||
mb_put_uint32le(struct mbchain *mbp, u_int32_t x)
|
||||
mb_put_uint32le(struct mbchain *mbp, uint32_t x)
|
||||
{
|
||||
x = htole32(x);
|
||||
return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
|
||||
@ -352,21 +352,21 @@ md_next_record(struct mdchain *mdp)
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint8(struct mdchain *mdp, u_int8_t *x)
|
||||
md_get_uint8(struct mdchain *mdp, uint8_t *x)
|
||||
{
|
||||
return md_get_mem(mdp, x, 1, MB_MINLINE);
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint16(struct mdchain *mdp, u_int16_t *x)
|
||||
md_get_uint16(struct mdchain *mdp, uint16_t *x)
|
||||
{
|
||||
return md_get_mem(mdp, (caddr_t)x, 2, MB_MINLINE);
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint16le(struct mdchain *mdp, u_int16_t *x)
|
||||
md_get_uint16le(struct mdchain *mdp, uint16_t *x)
|
||||
{
|
||||
u_int16_t v;
|
||||
uint16_t v;
|
||||
int error = md_get_uint16(mdp, &v);
|
||||
|
||||
if (x != NULL)
|
||||
@ -375,8 +375,9 @@ md_get_uint16le(struct mdchain *mdp, u_int16_t *x)
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint16be(struct mdchain *mdp, u_int16_t *x) {
|
||||
u_int16_t v;
|
||||
md_get_uint16be(struct mdchain *mdp, uint16_t *x)
|
||||
{
|
||||
uint16_t v;
|
||||
int error = md_get_uint16(mdp, &v);
|
||||
|
||||
if (x != NULL)
|
||||
@ -385,15 +386,15 @@ md_get_uint16be(struct mdchain *mdp, u_int16_t *x) {
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint32(struct mdchain *mdp, u_int32_t *x)
|
||||
md_get_uint32(struct mdchain *mdp, uint32_t *x)
|
||||
{
|
||||
return md_get_mem(mdp, (caddr_t)x, 4, MB_MINLINE);
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint32be(struct mdchain *mdp, u_int32_t *x)
|
||||
md_get_uint32be(struct mdchain *mdp, uint32_t *x)
|
||||
{
|
||||
u_int32_t v;
|
||||
uint32_t v;
|
||||
int error;
|
||||
|
||||
error = md_get_uint32(mdp, &v);
|
||||
@ -403,9 +404,9 @@ md_get_uint32be(struct mdchain *mdp, u_int32_t *x)
|
||||
}
|
||||
|
||||
int
|
||||
md_get_uint32le(struct mdchain *mdp, u_int32_t *x)
|
||||
md_get_uint32le(struct mdchain *mdp, uint32_t *x)
|
||||
{
|
||||
u_int32_t v;
|
||||
uint32_t v;
|
||||
int error;
|
||||
|
||||
error = md_get_uint32(mdp, &v);
|
||||
|
@ -44,24 +44,24 @@ caddr_t
|
||||
preload_search_by_name(const char *name)
|
||||
{
|
||||
caddr_t curp;
|
||||
u_int32_t *hdr;
|
||||
uint32_t *hdr;
|
||||
int next;
|
||||
|
||||
if (preload_metadata != NULL) {
|
||||
|
||||
curp = preload_metadata;
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
/* Search for a MODINFO_NAME field */
|
||||
if ((hdr[0] == MODINFO_NAME) &&
|
||||
!strcmp(name, curp + sizeof(u_int32_t) * 2))
|
||||
!strcmp(name, curp + sizeof(uint32_t) * 2))
|
||||
return(curp);
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
@ -76,7 +76,7 @@ caddr_t
|
||||
preload_search_by_type(const char *type)
|
||||
{
|
||||
caddr_t curp, lname;
|
||||
u_int32_t *hdr;
|
||||
uint32_t *hdr;
|
||||
int next;
|
||||
|
||||
if (preload_metadata != NULL) {
|
||||
@ -84,7 +84,7 @@ preload_search_by_type(const char *type)
|
||||
curp = preload_metadata;
|
||||
lname = NULL;
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
@ -94,11 +94,11 @@ preload_search_by_type(const char *type)
|
||||
|
||||
/* Search for a MODINFO_TYPE field */
|
||||
if ((hdr[0] == MODINFO_TYPE) &&
|
||||
!strcmp(type, curp + sizeof(u_int32_t) * 2))
|
||||
!strcmp(type, curp + sizeof(uint32_t) * 2))
|
||||
return(lname);
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
@ -113,7 +113,7 @@ caddr_t
|
||||
preload_search_next_name(caddr_t base)
|
||||
{
|
||||
caddr_t curp;
|
||||
u_int32_t *hdr;
|
||||
uint32_t *hdr;
|
||||
int next;
|
||||
|
||||
if (preload_metadata != NULL) {
|
||||
@ -122,15 +122,15 @@ preload_search_next_name(caddr_t base)
|
||||
if (base) {
|
||||
/* skip to next field */
|
||||
curp = base;
|
||||
hdr = (u_int32_t *)curp;
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
hdr = (uint32_t *)curp;
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
} else
|
||||
curp = preload_metadata;
|
||||
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
@ -139,7 +139,7 @@ preload_search_next_name(caddr_t base)
|
||||
return curp;
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
@ -155,13 +155,13 @@ caddr_t
|
||||
preload_search_info(caddr_t mod, int inf)
|
||||
{
|
||||
caddr_t curp;
|
||||
u_int32_t *hdr;
|
||||
u_int32_t type = 0;
|
||||
uint32_t *hdr;
|
||||
uint32_t type = 0;
|
||||
int next;
|
||||
|
||||
curp = mod;
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
/* end of module data? */
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
@ -182,10 +182,10 @@ preload_search_info(caddr_t mod, int inf)
|
||||
* data.
|
||||
*/
|
||||
if (hdr[0] == inf)
|
||||
return(curp + (sizeof(u_int32_t) * 2));
|
||||
return(curp + (sizeof(uint32_t) * 2));
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
@ -199,7 +199,7 @@ void
|
||||
preload_delete_name(const char *name)
|
||||
{
|
||||
caddr_t curp;
|
||||
u_int32_t *hdr;
|
||||
uint32_t *hdr;
|
||||
int next;
|
||||
int clearing;
|
||||
|
||||
@ -208,13 +208,13 @@ preload_delete_name(const char *name)
|
||||
clearing = 0;
|
||||
curp = preload_metadata;
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
/* Search for a MODINFO_NAME field */
|
||||
if (hdr[0] == MODINFO_NAME) {
|
||||
if (!strcmp(name, curp + sizeof(u_int32_t) * 2))
|
||||
if (!strcmp(name, curp + sizeof(uint32_t) * 2))
|
||||
clearing = 1; /* got it, start clearing */
|
||||
else if (clearing)
|
||||
clearing = 0; /* at next one now.. better stop */
|
||||
@ -223,7 +223,7 @@ preload_delete_name(const char *name)
|
||||
hdr[0] = MODINFO_EMPTY;
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
@ -235,7 +235,7 @@ void
|
||||
preload_bootstrap_relocate(vm_offset_t offset)
|
||||
{
|
||||
caddr_t curp;
|
||||
u_int32_t *hdr;
|
||||
uint32_t *hdr;
|
||||
vm_offset_t *ptr;
|
||||
int next;
|
||||
|
||||
@ -243,7 +243,7 @@ preload_bootstrap_relocate(vm_offset_t offset)
|
||||
|
||||
curp = preload_metadata;
|
||||
for (;;) {
|
||||
hdr = (u_int32_t *)curp;
|
||||
hdr = (uint32_t *)curp;
|
||||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
@ -252,14 +252,14 @@ preload_bootstrap_relocate(vm_offset_t offset)
|
||||
case MODINFO_ADDR:
|
||||
case MODINFO_METADATA|MODINFOMD_SSYM:
|
||||
case MODINFO_METADATA|MODINFOMD_ESYM:
|
||||
ptr = (vm_offset_t *)(curp + (sizeof(u_int32_t) * 2));
|
||||
ptr = (vm_offset_t *)(curp + (sizeof(uint32_t) * 2));
|
||||
*ptr += offset;
|
||||
break;
|
||||
}
|
||||
/* The rest is beyond us for now */
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = sizeof(uint32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
struct ptrace_io_desc32 {
|
||||
int piod_op;
|
||||
u_int32_t piod_offs;
|
||||
u_int32_t piod_addr;
|
||||
u_int32_t piod_len;
|
||||
uint32_t piod_offs;
|
||||
uint32_t piod_addr;
|
||||
uint32_t piod_len;
|
||||
};
|
||||
|
||||
struct ptrace_vm_entry32 {
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
static void
|
||||
systrace_args(int sysnum, void *params, u_int64_t *uarg, int *n_args)
|
||||
systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
{
|
||||
int64_t *iarg = (int64_t *) uarg;
|
||||
switch (sysnum) {
|
||||
|
@ -2027,7 +2027,7 @@ mbprof_textify(void)
|
||||
{
|
||||
int offset;
|
||||
char *c;
|
||||
u_int64_t *p;
|
||||
uint64_t *p;
|
||||
|
||||
|
||||
p = &mbprof.wasted[0];
|
||||
|
@ -314,7 +314,7 @@ m_tag_free_default(struct m_tag *t)
|
||||
|
||||
/* Get a packet tag structure along with specified data following. */
|
||||
struct m_tag *
|
||||
m_tag_alloc(u_int32_t cookie, int type, int len, int wait)
|
||||
m_tag_alloc(uint32_t cookie, int type, int len, int wait)
|
||||
{
|
||||
struct m_tag *t;
|
||||
|
||||
@ -376,7 +376,7 @@ m_tag_delete_nonpersistent(struct mbuf *m)
|
||||
|
||||
/* Find a tag, starting from a given position. */
|
||||
struct m_tag *
|
||||
m_tag_locate(struct mbuf *m, u_int32_t cookie, int type, struct m_tag *t)
|
||||
m_tag_locate(struct mbuf *m, uint32_t cookie, int type, struct m_tag *t)
|
||||
{
|
||||
struct m_tag *p;
|
||||
|
||||
|
@ -130,7 +130,7 @@ struct mqfs_node {
|
||||
int mn_refcount;
|
||||
mqfs_type_t mn_type;
|
||||
int mn_deleted;
|
||||
u_int32_t mn_fileno;
|
||||
uint32_t mn_fileno;
|
||||
void *mn_data;
|
||||
struct timespec mn_birth;
|
||||
struct timespec mn_ctime;
|
||||
|
@ -2602,7 +2602,7 @@ sctp_generic_recvmsg(td, uap)
|
||||
} */ *uap;
|
||||
{
|
||||
#if (defined(INET) || defined(INET6)) && defined(SCTP)
|
||||
u_int8_t sockbufstore[256];
|
||||
uint8_t sockbufstore[256];
|
||||
struct uio auio;
|
||||
struct iovec *iov, *tiov;
|
||||
struct sctp_sndrcvinfo sinfo;
|
||||
|
@ -379,7 +379,7 @@ cache_lookup(dvp, vpp, cnp)
|
||||
struct componentname *cnp;
|
||||
{
|
||||
struct namecache *ncp;
|
||||
u_int32_t hash;
|
||||
uint32_t hash;
|
||||
int error, ltype, wlocked;
|
||||
|
||||
if (!doingcache) {
|
||||
@ -602,7 +602,7 @@ cache_enter(dvp, vp, cnp)
|
||||
{
|
||||
struct namecache *ncp, *n2;
|
||||
struct nchashhead *ncpp;
|
||||
u_int32_t hash;
|
||||
uint32_t hash;
|
||||
int flag;
|
||||
int hold;
|
||||
int zap;
|
||||
|
@ -498,7 +498,7 @@ vfs_suser(struct mount *mp, struct thread *td)
|
||||
void
|
||||
vfs_getnewfsid(struct mount *mp)
|
||||
{
|
||||
static u_int16_t mntid_base;
|
||||
static uint16_t mntid_base;
|
||||
struct mount *nmp;
|
||||
fsid_t tfsid;
|
||||
int mtype;
|
||||
@ -4018,7 +4018,7 @@ vfs_event_init(void *arg)
|
||||
SYSINIT(vfs_knlist, SI_SUB_VFS, SI_ORDER_ANY, vfs_event_init, NULL);
|
||||
|
||||
void
|
||||
vfs_event_signal(fsid_t *fsid, u_int32_t event, intptr_t data __unused)
|
||||
vfs_event_signal(fsid_t *fsid, uint32_t event, intptr_t data __unused)
|
||||
{
|
||||
|
||||
KNOTE_UNLOCKED(&fs_knlist, event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user