* Wake up threads sleeping on the specified address. */
| 966 | * Wake up threads sleeping on the specified address. |
| 967 | */ |
| 968 | int |
| 969 | kern_umtx_wake(struct thread *td, void *uaddr, int n_wake, int is_private) |
| 970 | { |
| 971 | struct umtx_key key; |
| 972 | int ret; |
| 973 | |
| 974 | if ((ret = umtx_key_get(uaddr, TYPE_SIMPLE_WAIT, |
| 975 | is_private ? THREAD_SHARE : AUTO_SHARE, &key)) != 0) |
| 976 | return (ret); |
| 977 | umtxq_lock(&key); |
| 978 | umtxq_signal(&key, n_wake); |
| 979 | umtxq_unlock(&key); |
| 980 | umtx_key_release(&key); |
| 981 | return (0); |
| 982 | } |
| 983 | |
| 984 | /* |
| 985 | * Lock PTHREAD_PRIO_NONE protocol POSIX mutex. |
no test coverage detected