Cleanup in elf.c with .bss section clean; adm command mounts cdrom instead of floppy...
[ZeXOS.git] / libpthread / destroy.c
blobc172b31f856eb18a7d05b9294fd9038e8cde6ba8
1 /*
2 * ZeX/OS
3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <pthread.h>
23 int pthread_destroy ()
25 asm volatile (
26 "movl $51, %%eax;"
27 "int $0x80;" ::: "%eax", "memory");
29 unsigned *ret = SYSV_THREADCLOSE;
31 if (!ret)
32 return -1;
34 if (*ret == 1)
35 return 0;
37 return -1;