全部 创建

注册

登录


全部 创建
's Avatar

rempas

Joined 1698840465

最近 创建
最早 创建
最近 更新
最早 更新
所有 Gists 3
rempas's Avatar

rempas / stack head clone3 (futex)

0 喜欢
0 派生
1 文件
最后活跃于 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 喜欢
0 派生
1 文件
最后活跃于 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 喜欢
0 派生
1 文件
最后活跃于 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 */
更新 更早

由 Opengist 强力驱动 ⋅ Load: 6ms⋅

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