this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix the build issues in libSystem

+17 -26
+2 -1
src/libSystem/CMakeLists.txt
··· 83 83 set(machkern_SRCS 84 84 kernel-mach/host.cpp 85 85 kernel-mach/lockset.cpp 86 - kernel-mach/misc.cpp 87 86 kernel-mach/semaphore.cpp 88 87 kernel-mach/task.cpp 89 88 kernel-mach/time.cpp 90 89 kernel-mach/vm.cpp 90 + kernel-mach/error.cpp 91 91 kernel-mach/Futex.cpp 92 + kernel-mach/FutexSemaphore.cpp 92 93 ) 93 94 94 95 add_library(System.B.dylib SHARED ${libc_SRCS} ${bsdkern_SRCS} ${machkern_SRCS})
-9
src/libSystem/kernel-mach/misc.cpp
··· 1 - #include "misc.h" 2 - #include <cstdio> 3 - 4 - char* mach_error_string(kern_return_t rv) 5 - { 6 - static __thread char buf[100]; 7 - snprintf(buf, sizeof(buf), "Return value %d", rv); 8 - return buf; 9 - }
-16
src/libSystem/kernel-mach/misc.h
··· 1 - #ifndef MACH_MISC_H 2 - #define MACH_MISC_H 3 - #include <mach/kern_return.h> 4 - 5 - #ifdef __cplusplus 6 - extern "C" 7 - { 8 - #endif 9 - 10 - char* mach_error_string(kern_return_t rv); 11 - 12 - #ifdef __cplusplus 13 - } 14 - #endif 15 - 16 - #endif
+13
src/libSystem/libc/pthread.cpp
··· 2 2 #include "errno.h" 3 3 #include <cstdio> 4 4 5 + // This makes puppies die 6 + struct pthread_internal 7 + { 8 + void* ptrs[26]; 9 + pid_t tid; 10 + }; 11 + 12 + pid_t __darwin_pthread_mach_thread_np(pthread_t pth) 13 + { 14 + const pthread_internal* x = reinterpret_cast<pthread_internal*>(pth); 15 + return x->tid; 16 + } 17 + 5 18 int __darwin_pthread_mutexattr_settype(pthread_mutexattr_t* attr, int kind) 6 19 { 7 20 switch (kind)
+2
src/libSystem/libc/pthread.h
··· 49 49 int __darwin_pthread_mutex_trylock(__darwin_pthread_mutex_t* mutex); 50 50 int __darwin_pthread_mutex_unlock(__darwin_pthread_mutex_t* mutex); 51 51 52 + pid_t __darwin_pthread_mach_thread_np(pthread_t pth); 53 + 52 54 // TODO: add other pthread functions for errno translation 53 55 54 56 }