Lines Matching refs:kernel

227 /* perform various actions with a mutex in kernel memory. note that, since we aren't allowed
228 * to go to user space while still holding a mutex, the lock-acquiring actions in this kernel
231 * exist in the kernel (to determine if we're running with CONFIG_XNUPOST defined). Else,
261 T_ASSERT_POSIX_SUCCESS(ret, "sysctl: %s kernel mutex", action_name);
273 T_QUIET; T_ASSERT_POSIX_SUCCESS(ret, "Getting unslid location of kernel mutex. Size is %llu",
276 "Context should match unslid location of mutex in kernel memory");
334 /* perform various actions with a rwlock in kernel memory. note that, since we aren't allowed
335 * to go to user space while still holding a rwlock, the lock-acquiring actions in this kernel
338 * exist in the kernel (to determine if we're running with CONFIG_XNUPOST defined). Else,
375 T_ASSERT_POSIX_SUCCESS(ret, "sysctl: %s kernel rwlock", action_name);
387 T_QUIET; T_ASSERT_POSIX_SUCCESS(ret, "Getting unslid location of kernel rwlock");
388 …context, unslid_krwlck_address, "Context should match unslid location of rwlock in kernel memory");
437 // acquires a kernel rwlock for writing, and then waits on a kernel semaphore.
446 // attempts to acquire a kernel rwlock for reading, and doesn't wait on a semaphore afterwards.
494 * Uses a debug sysctl to initialize a kernel mutex.
496 * The 'waiting' thread grabs this kernel mutex, and immediately waits on a kernel semaphore.
497 * The 'grabbing' thread just attempts to lock the kernel mutex.
498 * When the semaphore is signalled, the 'waiting' thread will unlock the kernel mutex,
500 * This allows us to create a situation in the kernel where we know a thread to be blocked
501 * on a kernel mutex.
522 …hread_threadid_np(waiting, &thread_id); // this is the thread that currently holds the kernel mutex
538 …check_python(stackshot, "thread \\d+: kernel mutex %llx owned by thread %lld", curr->context, thre…
655 sleep(3); // give time for thread to spawn, fall back to kernel for contention, and block
687 // this thread should spawn, acquire a kernel rwlock for write, and then wait on a semaphore
691 // this thread should spawn and try to acquire the same kernel rwlock for read, but block
713 …hread_threadid_np(waiting, &thread_id); // this is the thread that currently holds the kernel mutex
884 T_DECL(stackshot_block_owner_klocks, "tests stackshot block owner for kernel locks") {