ObjFW  Diff

Differences From Artifact [24a798f944]:

To Artifact [a32c294bc5]:


11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
11
12
13
14
15
16
17

18
19
20
21
22
23
24
25







-
+








#import "OFObject.h"
#import "OFList.h"

#import "threading.h"

/**
 * A Thread Local Storage key.
 * \brief A class for Thread Local Storage keys.
 */
@interface OFTLSKey: OFObject
{
@public
	of_tlskey_t key;
@protected
	void (*destructor)(id);
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63
64

65
66
67
68
69
70
71







-
+









-







 * \param destructor A destructor that is called when the thread is terminated
 * \return An initialized Thread Local Storage key
 */
- initWithDestructor: (void(*)(id))destructor;
@end

/**
 * The OFThread class provides portable threads.
 * \brief A class which provides portable threads.
 *
 * To use it, you should create a new class derived from it and reimplement
 * main.
 */
@interface OFThread: OFObject
{
	id object;
	of_thread_t thread;
	BOOL running;

@public
	id retval;
}

/**
 * \param obj An object that is passed to the main method as a copy or nil
 * \return A new autoreleased thread
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127







-
+







 *
 * \return The object returned by the main method of the thread.
 */
- join;
@end

/**
 * A class for creating mutual exclusions.
 * \brief A class for creating mutual exclusions.
 */
@interface OFMutex: OFObject
{
	of_mutex_t mutex;
}

/**