ObjFW  Check-in [bb294c079c]

Overview
Comment:Fix compiling for MorphOS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bb294c079c1e226a9536eeec890f308cee004cf4daf59d082a8b3c2bdbf9e21b
User & Date: js on 2021-05-01 02:47:22
Other Links: manifest | tags
Context
2021-05-01
03:02
Rename directories in src/platform check-in: 4a6e3b42f5 user: js tags: trunk
02:47
Fix compiling for MorphOS check-in: bb294c079c user: js tags: trunk
02:42
OFFile: Add missing locking on AmigaOS check-in: d39e22d766 user: js tags: trunk
Changes

Modified src/OFAtomic_powerpc.h from [b84702cb04] to [44b886c5c2].

290
291
292
293
294
295
296
297

298
299
300
301
302
303
304
290
291
292
293
294
295
296

297
298
299
300
301
302
303
304







-
+







	    : "cc", "memory"
	);

	return i;
}

static OF_INLINE bool
OFAtomicIntCompAndSwap(volatile int *_Nonnull p, int o, int n)
OFAtomicIntCompareAndSwap(volatile int *_Nonnull p, int o, int n)
{
	int r;

	__asm__ __volatile__ (
	    "0:\n\t"
	    "lwarx	%0, 0, %3\n\t"
	    "cmpw	%0, %1\n\t"

Modified src/OFAtomic_sync_builtins.h from [cebe486547] to [16dfce6eb3].

112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126







-
+







static OF_INLINE bool
OFAtomicIntCompareAndSwap(volatile int *_Nonnull p, int o, int n)
{
	return __sync_bool_compare_and_swap(p, o, n);
}

static OF_INLINE bool
OFAtomicInt32CompAndSwap(volatile int32_t *_Nonnull p, int32_t o, int32_t n)
OFAtomicInt32CompareAndSwap(volatile int32_t *_Nonnull p, int32_t o, int32_t n)
{
	return __sync_bool_compare_and_swap(p, o, n);
}

static OF_INLINE bool
OFAtomicPointerCompareAndSwap(void *volatile _Nullable *_Nonnull p,
    void *_Nullable o, void *_Nullable n)

Modified src/platform/morphos/OFTLSKey.m from [8de1ab9b4a] to [493207d475].

14
15
16
17
18
19
20
21

22
23
24
25
26
27
28
29
30
31
32

33
34
35
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29
30
31

32
33
34
35







-
+










-
+



 */

#include "config.h"

#import "OFTLSKey.h"

int
OFTLSKeyNew(OFTLSKeyT *key)
OFTLSKeyNew(OFTLSKey *key)
{
	*key = TLSAllocA(NULL);

	if (*key == TLS_INVALID_INDEX)
		return EAGAIN;

	return 0;
}

int
OFTLSKeyFree(OFTLSKeyT key)
OFTLSKeyFree(OFTLSKey key)
{
	return (TLSFree(key) ? 0 : EINVAL);
}