[llvm-commits] [compiler-rt] r153182 - /compiler-rt/trunk/lib/asan/asan_mac.cc
Alexey Samsonov
samsonov at google.com
Wed Mar 21 06:00:05 PDT 2012
Author: samsonov
Date: Wed Mar 21 08:00:04 2012
New Revision: 153182
URL: http://llvm.org/viewvc/llvm-project?rev=153182&view=rev
Log:
[asan]: substitute extern decls with system header in asan_mac.cc
Modified:
compiler-rt/trunk/lib/asan/asan_mac.cc
Modified: compiler-rt/trunk/lib/asan/asan_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.cc?rev=153182&r1=153181&r2=153182&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Wed Mar 21 08:00:04 2012
@@ -23,6 +23,7 @@
#include "asan_thread_registry.h"
#include <crt_externs.h> // for _NSGetEnviron
+#include <dispatch/dispatch.h>
#include <mach-o/dyld.h>
#include <mach-o/loader.h>
#include <sys/mman.h>
@@ -429,11 +430,6 @@
typedef void* pthread_workqueue_t;
typedef void* pthread_workitem_handle_t;
-
-typedef void* dispatch_group_t;
-typedef void* dispatch_queue_t;
-typedef uint64_t dispatch_time_t;
-typedef void (*dispatch_function_t)(void *block);
typedef void* (*worker_t)(void *block);
// A wrapper for the ObjC blocks used to support libdispatch.
@@ -444,16 +440,10 @@
} asan_block_context_t;
extern "C" {
-void dispatch_async_f(dispatch_queue_t dq, void *ctxt,
- dispatch_function_t func);
-void dispatch_sync_f(dispatch_queue_t dq, void *ctxt,
- dispatch_function_t func);
-void dispatch_after_f(dispatch_time_t when, dispatch_queue_t dq, void *ctxt,
- dispatch_function_t func);
+// dispatch_barrier_async_f() is not declared in <dispatch/dispatch.h>.
void dispatch_barrier_async_f(dispatch_queue_t dq, void *ctxt,
dispatch_function_t func);
-void dispatch_group_async_f(dispatch_group_t group, dispatch_queue_t dq,
- void *ctxt, dispatch_function_t func);
+// Neither is pthread_workqueue_additem_np().
int pthread_workqueue_additem_np(pthread_workqueue_t workq,
void *(*workitem_func)(void *), void * workitem_arg,
pthread_workitem_handle_t * itemhandlep, unsigned int *gencountp);
More information about the llvm-commits
mailing list