Tools/DiskTool - Splitting parts out to be shared with NetTest
[tpg/acess2.git] / Tools / nativelib / threads.c
1 /*
2  * Acess2 libnative (Kernel Simulation Library)
3  * - By John Hodge (thePowersGang)
4  *
5  * threads.c
6  * - Threads handling
7  */
8 #include <acess.h>
9 #include <threads.h>
10
11 // === CODE ===
12 tThread *Proc_GetCurThread(void)
13 {
14         return NULL;
15 }
16
17 void Threads_PostEvent(tThread *Thread, Uint32 Events)
18 {
19         
20 }
21
22 Uint32 Threads_WaitEvents(Uint32 Events)
23 {
24         Log_KernelPanic("Threads", "Can't use _WaitEvents in DiskTool");
25         return 0;
26 }
27
28 void Threads_ClearEvent(Uint32 Mask)
29 {
30         
31 }
32
33 tUID Threads_GetUID(void) { return 0; }
34 tGID Threads_GetGID(void) { return 0; }
35
36 tTID Threads_GetTID(void) { return 0; }
37
38 int *Threads_GetMaxFD(void) { static int max_fd=32; return &max_fd; }
39 char **Threads_GetCWD(void) { static char *cwd; return &cwd; }
40 char **Threads_GetChroot(void) { static char *chroot; return &chroot; }
41
42 void Threads_Yield(void)
43 {
44         Log_Warning("Threads", "Threads_Yield DEFINITELY shouldn't be used");
45 }
46
47 void Threads_Sleep(void)
48 {
49         Log_Warning("Threads", "Threads_Sleep shouldn't be used");
50 }
51
52 int Threads_SetName(const char *Name)
53 {
54         Log_Notice("Threads", "TODO: Threads_SetName('%s')", Name);
55         return 0;
56 }
57
58 int *Threads_GetErrno(void) __attribute__ ((weak));
59
60 int *Threads_GetErrno(void)// __attribute__ ((weak))
61 {
62         static int a_errno;
63         return &a_errno;
64 }
65

UCC git Repository :: git.ucc.asn.au