]> git.saurik.com Git - apple/libdispatch.git/blob - src/shims/linux_stubs.c
libdispatch-703.1.4.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 #include <syscall.h>
21
22 #if __has_include(<config/config_ac.h>)
23 #include <config/config_ac.h>
24 #else
25 #include <config/config.h>
26 #endif
27
28 #include "pthread.h"
29 #include "os/linux_base.h"
30 #include "internal.h"
31
32
33 #undef LINUX_PORT_ERROR
34 #define LINUX_PORT_ERROR() do { printf("LINUX_PORT_ERROR_CALLED %s:%d: %s\n",__FILE__,__LINE__,__FUNCTION__); abort(); } while (0)
35
36
37 /*
38 * Stubbed out static data
39 */
40
41 pthread_key_t dispatch_voucher_key;
42 pthread_key_t dispatch_pthread_root_queue_observer_hooks_key;
43
44 unsigned short dispatch_timer__program_semaphore;
45 unsigned short dispatch_timer__wake_semaphore;
46 unsigned short dispatch_timer__fire_semaphore;
47 unsigned short dispatch_timer__configure_semaphore;
48 unsigned short dispatch_queue__pop_semaphore;
49 unsigned short dispatch_callout__entry_semaphore;
50 unsigned short dispatch_callout__return_semaphore;
51 unsigned short dispatch_queue__push_semaphore;
52 void (*_dispatch_block_special_invoke)(void*);
53 struct dispatch_queue_attr_s _dispatch_queue_attr_concurrent;