ObjFW  Diff

Differences From Artifact [619bce178b]:

  • File src/mutex.m — part of check-in [5358e9ea6a] at 2019-08-01 20:14:35 on branch trunk — Split threading.[hm] into multiple files This allows the runtime to only link against the parts it needs, without pulling in unnecessary parts like thread spawning, TLS and conditions. (user: js size: 2327)

To Artifact [5e75d9fbfc]:

  • File src/mutex.m — part of check-in [2f01be3808] at 2019-08-01 21:17:21 on branch trunk — Add mutexes for AmigaOS (user: js size: 2409)

19
20
21
22
23
24
25


26
27
28

29
30
31
32
33
34
35

#import "mutex.h"

#if defined(OF_HAVE_PTHREADS)
# include "mutex_pthread.m"
#elif defined(OF_WINDOWS)
# include "mutex_winapi.m"


#endif

#if !defined(OF_HAVE_RECURSIVE_PTHREAD_MUTEXES) && !defined(OF_WINDOWS)

bool
of_rmutex_new(of_rmutex_t *rmutex)
{
	if (!of_mutex_new(&rmutex->mutex))
		return false;

	if (!of_tlskey_new(&rmutex->count))







>
>


|
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#import "mutex.h"

#if defined(OF_HAVE_PTHREADS)
# include "mutex_pthread.m"
#elif defined(OF_WINDOWS)
# include "mutex_winapi.m"
#elif defined(OF_AMIGAOS)
# include "mutex_amiga.m"
#endif

#if !defined(OF_HAVE_RECURSIVE_PTHREAD_MUTEXES) && !defined(OF_WINDOWS) && \
    !defined(OF_AMIGAOS)
bool
of_rmutex_new(of_rmutex_t *rmutex)
{
	if (!of_mutex_new(&rmutex->mutex))
		return false;

	if (!of_tlskey_new(&rmutex->count))