ObjFW  Diff

Differences From Artifact [92014702e9]:

To Artifact [1343be0c29]:


68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94

95
96
97
98
99
100
101

102
68
69
70
71
72
73
74

75
76
77
78
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93

94
95
96
97
98
99
100

101
102







-
+











-
+






-
+






-
+

	return of_mutex_free(&mutex->mutex);
}

static void
objc_global_mutex_new(void)
{
	if (!objc_mutex_new(&global_mutex))
		ERROR("Failed to create global mutex!");
		OBJC_ERROR("Failed to create global mutex!");

	global_mutex_init = YES;
}

void
objc_global_mutex_lock(void)
{
	if (!global_mutex_init)
		objc_global_mutex_new();

	if (!objc_mutex_lock(&global_mutex))
		ERROR("Failed to lock global mutex!");
		OBJC_ERROR("Failed to lock global mutex!");
}

void
objc_global_mutex_unlock(void)
{
	if (!objc_mutex_unlock(&global_mutex))
		ERROR("Failed to unlock global mutex!");
		OBJC_ERROR("Failed to unlock global mutex!");
}

void
objc_global_mutex_free(void)
{
	if (!objc_mutex_free(&global_mutex))
		ERROR("Failed to free global mutex!");
		OBJC_ERROR("Failed to free global mutex!");
}