clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -94,7 +94,7 @@ __declspec(dllexport) int pthread_create(pthread_t* t, const pthread_attr_t* att
|
||||
&handle,
|
||||
&tid
|
||||
};
|
||||
uint32_t s = SysCreateThread(&req);
|
||||
KSTATUS s = SysCreateThread(&req);
|
||||
if (s != 0) {
|
||||
free(tr);
|
||||
return EAGAIN;
|
||||
@@ -112,7 +112,7 @@ __declspec(dllexport) int pthread_create(pthread_t* t, const pthread_attr_t* att
|
||||
|
||||
// Implements the pthread join operation.
|
||||
__declspec(dllexport) int pthread_join(pthread_t t, void** retval) {
|
||||
uint32_t s = SysWait(t.Handle, SYS_WAIT_FLAG_NONE);
|
||||
KSTATUS s = SysWait(t.Handle, SYS_WAIT_FLAG_NONE);
|
||||
if (s != 0) return ESRCH;
|
||||
|
||||
POSIX_PTHREAD_SLOT* slot = PthreadSlotFind(t.Tid);
|
||||
@@ -136,7 +136,7 @@ __declspec(dllexport) void pthread_exit(void* retval) {
|
||||
__declspec(dllexport) int pthread_mutex_init(pthread_mutex_t* m, const pthread_mutexattr_t* attr) {
|
||||
(void)attr;
|
||||
uint32_t h;
|
||||
uint32_t s = SysCreateMutex(&h);
|
||||
KSTATUS s = SysCreateMutex(&h);
|
||||
if (s != 0) return ENOMEM;
|
||||
m->Handle = h;
|
||||
return 0;
|
||||
@@ -151,18 +151,18 @@ __declspec(dllexport) int pthread_mutex_destroy(pthread_mutex_t* m) {
|
||||
|
||||
// Implements the pthread mutex lock operation.
|
||||
__declspec(dllexport) int pthread_mutex_lock(pthread_mutex_t* m) {
|
||||
uint32_t s = SysWait(m->Handle, SYS_WAIT_FLAG_NONE);
|
||||
KSTATUS s = SysWait(m->Handle, SYS_WAIT_FLAG_NONE);
|
||||
return s == 0 ? 0 : EINVAL;
|
||||
}
|
||||
|
||||
// Implements the pthread mutex trylock operation.
|
||||
__declspec(dllexport) int pthread_mutex_trylock(pthread_mutex_t* m) {
|
||||
uint32_t s = SysTryAcquireMutex(m->Handle);
|
||||
KSTATUS s = SysTryAcquireMutex(m->Handle);
|
||||
return s == 0 ? 0 : EAGAIN;
|
||||
}
|
||||
|
||||
// Implements the pthread mutex unlock operation.
|
||||
__declspec(dllexport) int pthread_mutex_unlock(pthread_mutex_t* m) {
|
||||
uint32_t s = SysReleaseMutex(m->Handle);
|
||||
KSTATUS s = SysReleaseMutex(m->Handle);
|
||||
return s == 0 ? 0 : EINVAL;
|
||||
}
|
||||
Reference in new issue
Block a user