]> git.saurik.com Git - apple/libdispatch.git/blob - src/shims/linux_stubs.c
libdispatch-913.1.6.tar.gz
[apple/libdispatch.git] / src / shims / linux_stubs.c
1 /*
2 * This source file is part of the Swift.org open source project
3 *
4 * Copyright (c) 2015 Apple Inc. and the Swift project authors
5 *
6 * Licensed under Apache License v2.0 with Runtime Library Exception
7 *
8 * See http://swift.org/LICENSE.txt for license information
9 * See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10 *
11 */
12
13 /*
14 * This file contains stubbed out functions we are using during
15 * the initial linux port. When the port is complete, this file
16 * should be empty (and thus removed).
17 */
18
19 #include <stdint.h>
20 #ifdef __ANDROID__
21 #include <sys/syscall.h>
22 #else
23 #include <syscall.h>
24 #endif /* __ANDROID__ */
25
26 #if __has_include(<config/config_ac.h>)
27 #include <config/config_ac.h>
28 #else
29 #include <config/config.h>
30 #endif
31
32 #include "pthread.h"
33 #include "os/linux_base.h"
34 #include "internal.h"
35
36
37 #undef LINUX_PORT_ERROR
38 #define LINUX_PORT_ERROR() do { printf("LINUX_PORT_ERROR_CALLED %s:%d: %s\n",__FILE__,__LINE__,__FUNCTION__); abort(); } while (0)
39
40
41 /*
42 * Stubbed out static data
43 */
44
45 pthread_key_t dispatch_voucher_key;
46 pthread_key_t dispatch_pthread_root_queue_observer_hooks_key;
47
48 unsigned short dispatch_timer__program_semaphore;
49 unsigned short dispatch_timer__wake_semaphore;
50 unsigned short dispatch_timer__fire_semaphore;
51 unsigned short dispatch_timer__configure_semaphore;
52 unsigned short dispatch_queue__pop_semaphore;
53 unsigned short dispatch_callout__entry_semaphore;
54 unsigned short dispatch_callout__return_semaphore;
55 unsigned short dispatch_queue__push_semaphore;
56 void (*_dispatch_block_special_invoke)(void*);
57 struct dispatch_queue_attr_s _dispatch_queue_attr_concurrent;