mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-08 16:36:21 +00:00
16 lines
266 B
C
16 lines
266 B
C
/* Test that setting NULL context causes the thread to exit. */
|
|
|
|
#include <assert.h>
|
|
#include <sys/syscall.h>
|
|
#include <ucontext.h>
|
|
|
|
int main(void)
|
|
{
|
|
syscall(SYS_context, SETCONTEXT, NULL);
|
|
|
|
/* This code should not be reached. */
|
|
assert(0);
|
|
return 0;
|
|
}
|
|
|