Lines Matching defs:in
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
39 * NOTICE: This file was modified by McAfee Research in 2004 to introduce
41 * is included in support of clause 2.2 (b) of the Apple Public License,
88 SEMMAP, /* # of entries in semaphore map */
90 SEMMNS, /* # of semaphores in system */
91 SEMMNU, /* # of undo structures in system */
95 SEMUSZ, /* size in bytes of undo structure */
105 SEMMAP, /* Unused, # of entries in semaphore map */
107 0, /* # of semaphores in system */
108 0, /* # of undo entries in system */
112 SEMUSZ, /* size in bytes of undo structure */
176 semid_ds_kernelto32(struct user_semid_ds *in, struct user32_semid_ds *out)
178 out->sem_perm = in->sem_perm;
179 out->sem_base = CAST_DOWN_EXPLICIT(__int32_t,in->sem_base);
180 out->sem_nsems = in->sem_nsems;
181 out->sem_otime = in->sem_otime; /* XXX loses precision */
182 out->sem_ctime = in->sem_ctime; /* XXX loses precision */
186 semid_ds_kernelto64(struct user_semid_ds *in, struct user64_semid_ds *out)
188 out->sem_perm = in->sem_perm;
189 out->sem_base = CAST_DOWN_EXPLICIT(__int32_t,in->sem_base);
190 out->sem_nsems = in->sem_nsems;
191 out->sem_otime = in->sem_otime; /* XXX loses precision */
192 out->sem_ctime = in->sem_ctime; /* XXX loses precision */
199 * this works because we copy fields in order from the end of the struct to
206 semid_ds_32tokernel(struct user32_semid_ds *in, struct user_semid_ds *out)
208 out->sem_ctime = in->sem_ctime;
209 out->sem_otime = in->sem_otime;
210 out->sem_nsems = in->sem_nsems;
211 out->sem_base = (void *)(uintptr_t)in->sem_base;
212 out->sem_perm = in->sem_perm;
216 semid_ds_64tokernel(struct user64_semid_ds *in, struct user_semid_ds *out)
218 out->sem_ctime = in->sem_ctime;
219 out->sem_otime = in->sem_otime;
220 out->sem_nsems = in->sem_nsems;
221 out->sem_base = (void *)(uintptr_t)in->sem_base;
222 out->sem_perm = in->sem_perm;
235 * Indirect parameters: uap->which sem call to invoke (index in array of sem calls)
305 * so they're already marked as "not in use".
385 * flag to MALLOC() above, so they're already marked as "not in use".
446 if (sema[i].u.sem_perm.mode & SEM_ALLOC) /* ID in use */
488 * Fill it in and return it if we find one.
509 /* All the structures are in use - try to free some */
623 /* fill in the new semaphore undo entry */
674 * because the alignment is the same in user and kernel space.
821 /* XXX could be done in one go... */
873 /* XXX could be done in one go... */
1313 * rollback the undo's in the exact reverse order that
1461 * in the BSD code at once.
1489 * There is a semaphore leak (i.e. memory leak) in this code.
1497 * with the creating group ID, count the number of processes left in
1584 /* Copy in the command structure */
1589 if (!IS_64BIT_PROCESS(p)) /* convert in place */
1650 if (!IS_64BIT_PROCESS(p)) /* convert in place */