/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-10-01 10:46:50 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20151001104650-s6d8bphieu709ncs
* Started working on Threads
* Started working on Base[16,32,64] [en,de]coding functionality.
* added waring that suchar is not an unsigned char type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
#include "defs.h"
6
6
#include "utils.h"
7
 
 
 
7
#include "Func.h"
8
8
 
9
9
BEGIN_DECLS
10
10
 
40
40
void
41
41
s_usleep (slong us);
42
42
 
 
43
 
 
44
/* ****************************************************************************
 
45
 ********************************** SMutex ************************************
 
46
 **************************************************************************** */
 
47
 
43
48
/**
44
49
 * @defgroup Mutex Mutex
45
50
 * @addtogroup Mutex
69
74
 *
70
75
 * Returns a key used to unlock the mutex.
71
76
 */
72
 
suint
 
77
sint
73
78
s_mutex_lock (SMutex * self);
74
79
 
75
80
/**
78
83
 * @param self The mutex to unlock;
79
84
 * @param key The key used to unlock the mutex.
80
85
 */
81
 
void
 
86
sint
82
87
s_mutex_unlock (SMutex * self);
83
88
 
84
89
/**
91
96
 
92
97
/** @} */
93
98
 
 
99
/* ****************************************************************************
 
100
 ********************************** SThread ***********************************
 
101
 **************************************************************************** */
 
102
 
 
103
/**
 
104
 * @defgroup SThread SThread
 
105
 * @addtogroup SThread
 
106
 * @{
 
107
 */
 
108
 
 
109
/**
 
110
 * An opaque data type representing a Thread.
 
111
 */
 
112
typedef struct SThread SThread;
 
113
 
 
114
/**
 
115
 * Creat a now Thread.
 
116
 */
 
117
SThread *
 
118
s_thread_new (RunFunc func);
 
119
 
 
120
/**
 
121
 * Free the thread object.
 
122
 */
 
123
void
 
124
s_thread_free (SThread * self);
 
125
 
 
126
/**
 
127
 * Run the thread.
 
128
 */
 
129
sboolean
 
130
s_thread_run (SThread * self, spointer user_data);
 
131
 
 
132
 
 
133
/** @} */
 
134
 
94
135
/** @} */
95
136
 
96
137
END_DECLS