diff --git a/duct-tape/pthread/kern_synch.c b/duct-tape/pthread/kern_synch.c index 059e844..aa2b6d3 100644 --- a/duct-tape/pthread/kern_synch.c +++ b/duct-tape/pthread/kern_synch.c @@ -35,6 +35,8 @@ #include #include #include "kern_internal.h" + +#include #endif // __DARLING__ #include @@ -98,8 +100,14 @@ typedef struct uthread *uthread_t; //#define __FAILEDUSERTEST__(s) do { panic(s); } while (0) + +#ifdef __DARLING__ +#define __FAILEDUSERTEST__(s) do { dtape_log_error("PSYNCH: pid[%d]: %s\n", proc_pid(current_proc()), s); } while (0) +#define __FAILEDUSERTEST2__(s, x...) do { dtape_log_error("PSYNCH: pid[%d]: " s "\n", proc_pid(current_proc()), x); } while (0) +#else #define __FAILEDUSERTEST__(s) do { printf("PSYNCH: pid[%d]: %s\n", proc_pid(current_proc()), s); } while (0) #define __FAILEDUSERTEST2__(s, x...) do { printf("PSYNCH: pid[%d]: " s "\n", proc_pid(current_proc()), x); } while (0) +#endif // __DARLING__ lck_mtx_t *pthread_list_mlock;