ObjFW  Diff

Differences From Artifact [7cf05d0077]:

  • File src/threading.h — part of check-in [52e02c06ca] at 2014-08-01 12:27:29 on branch trunk — Change return type for thread main

    This changes the return type to void, as the return type of a thread's
    main depends on the threading implementation used. For pthreads, it adds
    a wrapper function which returns NULL to avoid problems with bogus
    return values. For WinAPI threads, the function is just casted, as bogus
    return values don't seem to matter there. (user: js, size: 6448) [annotate] [blame] [check-ins using]

To Artifact [a8b345125c]:


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
typedef of_mutex_t of_spinlock_t;
#endif

#ifdef OF_HAVE_SCHED_YIELD
# include <sched.h>
#endif

#ifdef OF_HAVE_RECURSIVE_PTHREAD_MUTEXES
# define of_rmutex_t of_mutex_t
#else
typedef struct {
	of_mutex_t mutex;
	of_tlskey_t count;
} of_rmutex_t;
#endif







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
typedef of_mutex_t of_spinlock_t;
#endif

#ifdef OF_HAVE_SCHED_YIELD
# include <sched.h>
#endif

#if defined(OF_HAVE_RECURSIVE_PTHREAD_MUTEXES) || defined(_WIN32)
# define of_rmutex_t of_mutex_t
#else
typedef struct {
	of_mutex_t mutex;
	of_tlskey_t count;
} of_rmutex_t;
#endif