Displaying 1 result from an estimated 1 matches for "dispatch_queue_cr".
Did you mean:
dispatch_queue_t
2015 Apr 08
2
[LLVMdev] __sync_add_and_fetch in objc block for global variable on ARM
...f many..many threads> 5, after every
__sync_add_and_fetch got damaged
...
int32_t count = 0;
...
int
main(int argc, char *argv[])
{
for (i = 1; i < 32; ++i) {
...
char* name;
asprintf(&name, "test.overcommit.%d", i);
dispatch_queue_t queue = dispatch_queue_create(name, NULL);
free(name);
dispatch_set_target_queue(queue, dispatch_get_global_queue(0,
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)));
/* async queue */
dispatch_async(queue, ^{
__sync_add_and_fetch(&count, 1); //&...