- user/errno.c: documented per-process errno isolation via fork
- include/syscall.h: added SYSCALL_SET_THREAD_AREA(57) for future TLS
- src/kernel/syscall.c: set_thread_area dispatch stub (-ENOSYS)
- True TLS deferred until clone/threads (task #14) is implemented
- cppcheck clean, 19/19 smoke tests pass
SYSCALL_LINK = 54,
SYSCALL_SYMLINK = 55,
SYSCALL_READLINK = 56,
+
+ SYSCALL_SET_THREAD_AREA = 57,
};
#endif
return;
}
+ if (syscall_no == SYSCALL_SET_THREAD_AREA) {
+ /* Stub: will be implemented when clone/threads are added */
+ regs->eax = (uint32_t)-ENOSYS;
+ return;
+ }
+
regs->eax = (uint32_t)-ENOSYS;
}
+/* Per-process errno: each fork()ed process gets its own copy in its
+ address space. When true threads (clone) are added, this must become
+ __thread int errno or use a TLS segment (GS/FS). */
int errno = 0;