Minden Új

Regisztráció

Bejelentkezés


Minden Új
's Avatar

rempas

Hozzáadva 1698840465

Újabbtól létrehozva
Utolsótól létrehozva
Újabbtól módosítva
Utolsótól módosítva
Összes gist 3
rempas's Avatar

rempas / stack head clone3 (futex)

0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív 1699737790
Stack head with clone3 (futex version)
1 // libc-free x86-64 Linux multi-threading example
2 // $ cc -nostdlib stack_head.c
3 // Ref: https://nullprogram.com/blog/2023/03/23/
4 // This is free and unencumbered software released into the public domain.
5
6 #include "clone_args.h"
7
8 #define SYS_write 1
9 #define SYS_mmap 9
10 #define SYS_nanosleep 35
rempas's Avatar

rempas / stack head clone3 (waitid)

0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív 1698841090
Stack head with clone3 (waitid version)
1 // libc-free x86-64 Linux multi-threading example
2 // $ cc -nostdlib stack_head.c
3 // Ref: https://nullprogram.com/blog/2023/03/23/
4 // This is free and unencumbered software released into the public domain.
5 //
6 #include "clone_args.h"
7
8 #define SYS_write 1
9 #define SYS_mmap 9
10 #define SYS_nanosleep 35
rempas's Avatar

rempas / clone_args.h

0 Kedvelések
0 forkok
1 fájlok
Utoljára aktív 1698840566
The header file
1 #pragma once
2 #include "linux/types.h"
3 #include <linux/sched.h>
4 #include <asm-generic/siginfo.h>
5
6 #define SYS_clone3 435
7 #define SIGCHLD 17
8
9 typedef struct {
10 __aligned_u64 flags; /* Flags bit mask */
Újabb Régebbi

Ez az oldal Opengist alapú ⋅ Load: 6ms⋅

Magyar
English Español Français Magyar Русский 中文