2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
7 #include <CoreFoundation/CoreFoundation.h>
9 #include <dispatch/dispatch.h>
11 //#import <Foundation/Foundation.h>
14 // CONFIG rdar://problem/6371811
16 const char *whoami
= "nobody";
18 void EnqueueStuff(dispatch_queue_t q
)
20 __block CFIndex counter
;
22 // above call has a side effect: it works around:
23 // <rdar://problem/6225809> __block variables not implicitly imported into intermediate scopes
30 //printf("outer block.\n");
33 //printf("inner block.\n");
36 printf("%s: success\n", whoami
);
41 printf("already done? inconceivable!\n");
47 int main (int argc
, const char * argv
[]) {
48 dispatch_queue_t q
= dispatch_queue_create("queue", NULL
);
55 printf("shouldn't get here\n");