ObjFW  Check-in [4bb1e7096e]

Overview
Comment:-[OFKernelEventObserver cancel]: Handle EINTR
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.1
Files: files | file ages | folders
SHA3-256: 4bb1e7096e1c61ea1edf10b80773eceaed732bcd5dbcb3716a9e82eec7a4eb72
User & Date: js on 2024-07-29 19:41:50
Other Links: branch diff | manifest | tags
Context
2024-07-29
22:19
Fix missing underscore in last commit check-in: edaf4a090e user: js tags: 1.1
19:41
-[OFKernelEventObserver cancel]: Handle EINTR check-in: 4bb1e7096e user: js tags: 1.1
19:41
-[OFKernelEventObserver cancel]: Handle EINTR check-in: ed598fd848 user: js tags: trunk
2024-07-21
12:18
Fix ObjC++ with GCC check-in: 60c6616ea4 user: js tags: 1.1
Changes

Modified src/OFKernelEventObserver.m from [0c63190dd8] to [9e9d5309f1].

262
263
264
265
266
267
268

269





270

271
272






273

274
275






276
277
278
262
263
264
265
266
267
268
269

270
271
272
273
274
275
276


277
278
279
280
281
282
283
284


285
286
287
288
289
290
291
292
293







+
-
+
+
+
+
+

+
-
-
+
+
+
+
+
+

+
-
-
+
+
+
+
+
+



	if (_waitingTask != NULL) {
		Signal(_waitingTask, (1ul << _cancelSignal));
		_waitingTask = NULL;
	}

	Permit();
#elif defined(OF_HAVE_PIPE)
	do {
	OFEnsure(write(_cancelFD[1], "", 1) > 0);
		if (write(_cancelFD[1], "", 1) == 1)
			break;

		OFEnsure(errno == EINTR);
	} while (true);
#elif defined(OF_WII)
	do {
	OFEnsure(sendto(_cancelFD[1], "", 1, 0,
	    (struct sockaddr *)&_cancelAddr, 8) > 0);
		if (sendto(_cancelFD[1], "", 1, 0,
		    (struct sockaddr *)&_cancelAddr, 8) == 1)
			break;

		OFEnsure(OFSocketErrNo() == EINTR);
	} while (true);
#else
	do {
	OFEnsure(sendto(_cancelFD[1], (void *)"", 1, 0,
	    (struct sockaddr *)&_cancelAddr, sizeof(_cancelAddr)) > 0);
		if (sendto(_cancelFD[1], (void *)"", 1, 0,
		    (struct sockaddr *)&_cancelAddr, sizeof(_cancelAddr)) == 1)
			break;

		OFEnsure(OFSocketErrNo() == EINTR);
	} while (true);
#endif
}
@end