ObjFW  Check-in [0b6bf65d2e]

Overview
Comment:Pass NULL if pthread attributes are not available
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0b6bf65d2ea3481e4f38d82543598f63ece18ea2746d6953fa6f751ed9c0e4e2
User & Date: js on 2021-01-13 23:08:19
Other Links: manifest | tags
Context
2021-01-14
01:11
Don't use pthread priorities on HP-UX check-in: ab0f2cc617 user: js tags: trunk
2021-01-13
23:08
Pass NULL if pthread attributes are not available check-in: 0b6bf65d2e user: js tags: trunk
23:01
Wrap _XOPEN_SOURCE_EXTENDED define in #ifndef check-in: 430d54e2a9 user: js tags: trunk
Changes

Modified src/platform/posix/thread.m from [5a946f82c1] to [2393ddfd78].

160
161
162
163
164
165
166
167


168
169
170
171
172
173
174
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175







-
+
+







		if ((ctx = malloc(sizeof(*ctx))) == NULL)
			return ENOMEM;

		ctx->function = function;
		ctx->object = object;
		ctx->name = name;

		error = pthread_create(thread, &POSIXAttr, functionWrapper,
		error = pthread_create(thread,
		    (POSIXAttrAvailable ? &POSIXAttr : NULL), functionWrapper,
		    ctx);
	} @finally {
		if (POSIXAttrAvailable)
			pthread_attr_destroy(&POSIXAttr);
	}

	return error;