| 80 | } |
| 81 | |
| 82 | int |
| 83 | syscall_thread_enter(struct thread *td, struct sysent *se) |
| 84 | { |
| 85 | u_int32_t cnt, oldcnt; |
| 86 | |
| 87 | KASSERT((se->sy_thrcnt & SY_THR_STATIC) == 0, |
| 88 | ("%s: not a static syscall", __func__)); |
| 89 | |
| 90 | do { |
| 91 | oldcnt = se->sy_thrcnt; |
| 92 | if ((oldcnt & (SY_THR_DRAINING | SY_THR_ABSENT)) != 0) |
| 93 | return (ENOSYS); |
| 94 | cnt = oldcnt + SY_THR_INCR; |
| 95 | } while (atomic_cmpset_acq_32(&se->sy_thrcnt, oldcnt, cnt) == 0); |
| 96 | return (0); |
| 97 | } |
| 98 | |
| 99 | void |
| 100 | syscall_thread_exit(struct thread *td, struct sysent *se) |
no test coverage detected