mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
master gem5 ThreadContext vs ThreadState vs ExecContext vs Process!
This commit is contained in:
13
userland/posix/getpid.c
Normal file
13
userland/posix/getpid.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#getpid */
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(void) {
|
||||
printf("pid=%jd\n", (intmax_t)getpid());
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user