Differences From Artifact [757dd832c3]:
- File src/OFThread.m — part of check-in [7413f500db] at 2018-08-16 22:33:28 on branch trunk — Fix compilation for AmigaOS 4 (user: js, size: 9820) [annotate] [blame] [check-ins using]
To Artifact [b00f8ab9a5]:
- File
src/OFThread.m
— part of check-in
[d71abc5366]
at
2018-08-17 01:17:14
on branch trunk
— AmigaOS 4: Do not use libauto
libauto loads the libraries too late. (user: js, size: 10559) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 | # include <sched.h> #endif #include "unistd_wrapper.h" #include "platform.h" #ifdef OF_AMIGAOS | > | > > > > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # include <sched.h> #endif #include "unistd_wrapper.h" #include "platform.h" #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 # define __USE_INLINE__ # define __NOLIBBASE__ # define __NOGLOBALIFACE__ # endif # include <proto/exec.h> # include <proto/dos.h> #endif #ifdef OF_WII # define nanosleep ogc_nanosleep # include <ogcsys.h> # undef nanosleep |
︙ | ︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #ifdef OF_HAVE_ATOMIC_OPS # import "atomic.h" #endif #ifdef OF_DJGPP # define lrint(x) rint(x) #endif #if defined(OF_HAVE_THREADS) # import "threading.h" static of_tlskey_t threadSelfKey; static OFThread *mainThread; | > > > > > > > > > > > > > > > | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | #ifdef OF_HAVE_ATOMIC_OPS # import "atomic.h" #endif #ifdef OF_DJGPP # define lrint(x) rint(x) #endif #ifdef OF_AMIGAOS4 extern struct ExecIFace *IExec; static struct Library *DOSBase = NULL; static struct DOSIFace *IDOS = NULL; OF_DESTRUCTOR() { if (IDOS != NULL) DropInterface(IDOS); if (DOSBase != NULL) CloseLibrary(DOSBase); } #endif #if defined(OF_HAVE_THREADS) # import "threading.h" static of_tlskey_t threadSelfKey; static OFThread *mainThread; |
︙ | ︙ | |||
184 185 186 187 188 189 190 191 192 193 194 195 196 197 | return nil; if (thread->_threadDictionary == nil) thread->_threadDictionary = [[OFMutableDictionary alloc] init]; return thread->_threadDictionary; } #endif #ifdef OF_HAVE_SOCKETS + (OFDNSResolver *)DNSResolver { # ifdef OF_HAVE_THREADS OFThread *thread = of_tlskey_get(threadSelfKey); | > > > > > > > > > > > > > > > | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | return nil; if (thread->_threadDictionary == nil) thread->_threadDictionary = [[OFMutableDictionary alloc] init]; return thread->_threadDictionary; } #elif defined(OF_AMIGAOS4) + (void)initialize { if (self != [OFThread class]) return; if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((IDOS = (struct DOSIFace *) GetInterface(DOSBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; } #endif #ifdef OF_HAVE_SOCKETS + (OFDNSResolver *)DNSResolver { # ifdef OF_HAVE_THREADS OFThread *thread = of_tlskey_get(threadSelfKey); |
︙ | ︙ |