diff options
| author | Russ Cox <rsc@swtch.com> | 2020-01-08 20:03:31 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@swtch.com> | 2020-01-13 16:46:14 -0500 |
| commit | ce27d7babdf2ee09ff6d1f8d4a166c2208995774 (patch) | |
| tree | af0a32622542ca768cc0446c6287a4f51a7d1c06 /src/cmd/devdraw/cocoa-thread.h | |
| parent | db20f89c3286f277945ac4307f789a9980d31bf6 (diff) | |
| download | plan9port-ce27d7babdf2ee09ff6d1f8d4a166c2208995774.tar.gz plan9port-ce27d7babdf2ee09ff6d1f8d4a166c2208995774.zip | |
devdraw: can use libthread directly now on macOS
Diffstat (limited to 'src/cmd/devdraw/cocoa-thread.h')
| -rw-r--r-- | src/cmd/devdraw/cocoa-thread.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/cmd/devdraw/cocoa-thread.h b/src/cmd/devdraw/cocoa-thread.h deleted file mode 100644 index d5793f0a..00000000 --- a/src/cmd/devdraw/cocoa-thread.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * I am too ignorant to know if Cocoa and Libthread - * can coexist: if I try to include thread.h, now - * that Devdraw uses Cocoa's threads (and timers), it - * crashes immediately; when Devdraw was using - * proccreate(), it could run a little while before to - * crash; the origin of those crashes is hard to - * ascertain, because other programs using Libthread - * (such as 9term, Acme, Plumber, and Sam) currently - * don't run when compiled with Xcode 4.1. - */ -//#define TRY_LIBTHREAD - -#ifdef TRY_LIBTHREAD - #include <thread.h> -#else - #define QLock DQLock - #define qlock dqlock - #define qunlock dqunlock - #define threadexitsall exits - #define threadmain main - - typedef struct QLock QLock; - - struct QLock - { - int init; - pthread_mutex_t m; - }; - - void qlock(QLock*); - void qunlock(QLock*); - int threadid(void); -#endif |
