/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/Thread.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-09-20 20:46:17 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150920204617-yhd8fal54o6mgwio
I have no idea why this is not working...0_o...

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#include "defs.h"
6
6
#include "utils.h"
7
7
 
 
8
 
8
9
BEGIN_DECLS
9
10
 
 
11
#if  !__STDC_NO_ATOMICS__
 
12
#pragma message ("We have _Atomic")
 
13
#include <stdatomic.h>
 
14
#else
 
15
#pragma message ("We don't have standard _Atomic. includeing external .h file.")
 
16
#include "external/stdatomic.h"
 
17
#endif
 
18
 
 
19
#if !__STDC_NO_THREADS__
 
20
#pragma message ("We have threads.h")
 
21
#include <threads.h>
 
22
#else
 
23
#pragma message ("We don't have standard threads.h. includeing external .h file.")
 
24
#include "external/threads.h"
 
25
#endif
 
26
 
 
27
 
10
28
/**
11
29
 * @defgroup Threading Threading
12
30
 * @addtogroup Threading
15
33
 
16
34
 
17
35
/**
18
 
 * Sleep for a set amount of mucro seconds.
 
36
 * Sleep for a set amount of micro seconds.
19
37
 */
20
38
void
21
39
s_usleep (slong us);
62
80
s_mutex_unlock (SMutex * self, suint key);
63
81
 
64
82
/**
65
 
 * 
 
83
 * Check if a mutex is locked.
 
84
 *
 
85
 * Note that this operation is non-atomic and may be wrong. 
66
86
 */
67
87
sboolean
68
88
s_mutex_check_lock (SMutex * self);