diff options
Diffstat (limited to 'lib/libthr/arch')
-rw-r--r-- | lib/libthr/arch/i386/i386/_setcurthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libthr/arch/i386/i386/_setcurthread.c b/lib/libthr/arch/i386/i386/_setcurthread.c index 29cd646..94c6561 100644 --- a/lib/libthr/arch/i386/i386/_setcurthread.c +++ b/lib/libthr/arch/i386/i386/_setcurthread.c @@ -62,7 +62,10 @@ ldt_init(void) void _retire_thread(void *entry) { - *(void **)entry = *ldt_free; + if (ldt_free == NULL) + *(void **)entry = NULL; + else + *(void **)entry = *ldt_free; ldt_free = entry; } |