static void futex_put(struct futex *f, struct waiting_proc *wp) { LIN_SDT_PROBE2(futex, futex_put, entry, f, wp); FUTEX_ASSERT_LOCKED(f); if (wp != NULL) { if ((wp->wp_flags & FUTEX_WP_REMOVED) == 0) TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list); free(wp, M_FUTEX_WP); } FUTEXES_LOCK; if (--f->f_refcount == 0) { LIST_REMOVE(f, f_list); FUTEXES_UNLOCK; FUTEX_UNLOCK(f); LIN_SDT_PROBE3(futex, futex_put, destroy, f->f_uaddr, f->f_refcount, f->f_key.shared); LINUX_CTR3(sys_futex, "futex_put destroy uaddr %p ref %d " "shared %d", f->f_uaddr, f->f_refcount, f->f_key.shared); umtx_key_release(&f->f_key); FUTEX_DESTROY(f); free(f, M_FUTEX); LIN_SDT_PROBE0(futex, futex_put, return); return; }
static int linux_to_native_timespec(struct timespec *ntp, struct l_timespec *ltp) { LIN_SDT_PROBE2(time, linux_to_native_timespec, entry, ntp, ltp); if (ltp->tv_sec < 0 || ltp->tv_nsec > (l_long)999999999L) { LIN_SDT_PROBE1(time, linux_to_native_timespec, return, EINVAL); return (EINVAL); }
static void native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp) { LIN_SDT_PROBE2(time, native_to_linux_timespec, entry, ltp, ntp); ltp->tv_sec = ntp->tv_sec; ltp->tv_nsec = ntp->tv_nsec; LIN_SDT_PROBE0(time, native_to_linux_timespec, return); }
char * linux_driver_get_name_dev(device_t dev) { struct device_element *de; const char *device_name = device_get_name(dev); LIN_SDT_PROBE2(util, linux_driver_get_name_dev, entry, dev, device_name); if (device_name == NULL) { LIN_SDT_PROBE0(util, linux_driver_get_name_dev, nullcall); LIN_SDT_PROBE1(util, linux_driver_get_name_dev, return, NULL); return NULL; }
int linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) { struct ucred *newcred, *oldcred; l_gid16_t *linux_gidset; gid_t *bsd_gidset; int ngrp, error; struct proc *p; LIN_SDT_PROBE2(uid16, linux_setgroups16, entry, args->gidsetsize, args->gidset); ngrp = args->gidsetsize; if (ngrp < 0 || ngrp >= ngroups_max + 1) { LIN_SDT_PROBE1(uid16, linux_setgroups16, return, EINVAL); return (EINVAL); }
/* this returns locked reference to the emuldata entry (if found) */ struct linux_emuldata * em_find(struct proc *p, int locked) { struct linux_emuldata *em; LIN_SDT_PROBE2(emul, em_find, entry, p, locked); if (locked == EMUL_DOLOCK) EMUL_LOCK(&emul_lock); em = p->p_emuldata; if (em == NULL && locked == EMUL_DOLOCK) EMUL_UNLOCK(&emul_lock); LIN_SDT_PROBE1(emul, em_find, return, em); return (em); }
static int handle_string(struct l___sysctl_args *la, char *value) { int error; LIN_SDT_PROBE2(sysctl, handle_string, entry, la, value); if (la->oldval != 0) { l_int len = strlen(value); error = copyout(value, PTRIN(la->oldval), len + 1); if (!error && la->oldlenp != 0) error = copyout(&len, PTRIN(la->oldlenp), sizeof(len)); if (error) { LIN_SDT_PROBE1(sysctl, handle_string, copyout_error, error); LIN_SDT_PROBE1(sysctl, handle_string, return, error); return (error); } }