git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tools/nativelib - Many features implimented
[tpg/acess2.git]
/
Tools
/
nativelib
/
include
/
threads_int.h
diff --git
a/Tools/nativelib/include/threads_int.h
b/Tools/nativelib/include/threads_int.h
index
cc0c3e0
..
36e5aba
100644
(file)
--- a/
Tools/nativelib/include/threads_int.h
+++ b/
Tools/nativelib/include/threads_int.h
@@
-8,24
+8,35
@@
#ifndef _THREADS_INT_H_
#define _THREADS_INT_H_
#ifndef _THREADS_INT_H_
#define _THREADS_INT_H_
+#define THREAD_EVENT_RWLOCK (1 << 8)
+
typedef struct sThreadIntMutex tThreadIntMutex; // actually pthreads
typedef struct sThreadIntSem tThreadIntSem;
struct sProcess
{
struct sProcess *Next;
typedef struct sThreadIntMutex tThreadIntMutex; // actually pthreads
typedef struct sThreadIntSem tThreadIntSem;
struct sProcess
{
struct sProcess *Next;
+ struct sThread *Threads;
int PID;
int UID, GID;
char *CWD;
char *Chroot;
int PID;
int UID, GID;
char *CWD;
char *Chroot;
+
int MaxFDs;
int MaxFDs;
+ void *Handles;
};
struct sThread
{
struct sThread *Next;
};
struct sThread
{
struct sThread *Next;
+ struct sThread *ListNext;
+
+ struct sProcess *Process;
+ struct sThread *ProcNext;
+
+ void *ThreadHandle;
int TID;
tThreadIntMutex *Protector;
int TID;
tThreadIntMutex *Protector;
@@
-33,13
+44,18
@@
struct sThread
uint32_t PendingEvents;
uint32_t WaitingEvents;
tThreadIntSem *WaitSemaphore; // pthreads
uint32_t PendingEvents;
uint32_t WaitingEvents;
tThreadIntSem *WaitSemaphore; // pthreads
-
+
+ char *Name;
+
// Init Only
void (*SpawnFcn)(void*);
void *SpawnData;
};
// Init Only
void (*SpawnFcn)(void*);
void *SpawnData;
};
+extern struct sThread __thread *lpThreads_This;
+
extern int Threads_int_CreateThread(struct sThread *Thread);
extern int Threads_int_CreateThread(struct sThread *Thread);
+extern int Threads_int_ThreadingEnabled(void);
extern tThreadIntMutex *Threads_int_MutexCreate(void);
extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
extern tThreadIntMutex *Threads_int_MutexCreate(void);
extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
UCC
git Repository :: git.ucc.asn.au