160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
if ((ctx = malloc(sizeof(*ctx))) == NULL)
return ENOMEM;
ctx->function = function;
ctx->object = object;
ctx->name = name;
error = pthread_create(thread, &POSIXAttr, functionWrapper,
ctx);
} @finally {
if (POSIXAttrAvailable)
pthread_attr_destroy(&POSIXAttr);
}
return error;
|
|
>
|
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,
(POSIXAttrAvailable ? &POSIXAttr : NULL), functionWrapper,
ctx);
} @finally {
if (POSIXAttrAvailable)
pthread_attr_destroy(&POSIXAttr);
}
return error;
|