ObjFW  Check-in [3c865f9e41]

Overview
Comment:Minor improvements for threads on Windows
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3c865f9e419ad314c24110b1014a70ffe2cea23f8d2bef93c2edc0e91aa291e2
User & Date: js on 2019-08-02 12:24:56
Other Links: manifest | tags
Context
2019-08-03
18:13
Add threads for AmigaOS check-in: da383f4f03 user: js tags: trunk
2019-08-02
12:24
Minor improvements for threads on Windows check-in: 3c865f9e41 user: js tags: trunk
12:23
OFThread: Set main thread to running check-in: a2ab241bc7 user: js tags: trunk
Changes

Modified src/condition_winapi.m from [c7f4f2bb50] to [984c51a6f0].

33
34
35
36
37
38
39


40
41
42
43
44
45
46
47
{
	return SetEvent(condition->event);
}

bool
of_condition_broadcast(of_condition_t *condition)
{


	for (int i = 0; i < condition->count; i++)
		if (!SetEvent(condition->event))
			return false;

	return true;
}

bool







>
>
|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
	return SetEvent(condition->event);
}

bool
of_condition_broadcast(of_condition_t *condition)
{
	int count = condition->count;

	for (int i = 0; i < count; i++)
		if (!SetEvent(condition->event))
			return false;

	return true;
}

bool

Modified src/thread_winapi.m from [b6b9499d85] to [e19ec23cc7].

70
71
72
73
74
75
76

77
78
79
80
81
82
83
84

	return true;
}

bool
of_thread_detach(of_thread_t thread)
{

	/* FIXME */
	return true;
}

void
of_thread_set_name(const char *name)
{
}







>
|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

	return true;
}

bool
of_thread_detach(of_thread_t thread)
{
	CloseHandle(thread);

	return true;
}

void
of_thread_set_name(const char *name)
{
}