| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rumpuser_pth_dummy.c,v 1.1 2010/02/26 18:54:20 pooka Exp $ */ | | 1 | /* $NetBSD: rumpuser_pth_dummy.c,v 1.2 2011/05/23 20:49:08 joerg Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * | | 14 | * |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
25 | * SUCH DAMAGE. | | 25 | * SUCH DAMAGE. |
26 | */ | | 26 | */ |
27 | | | 27 | |
28 | #include <sys/cdefs.h> | | 28 | #include <sys/cdefs.h> |
29 | #if !defined(lint) | | 29 | #if !defined(lint) |
30 | __RCSID("$NetBSD: rumpuser_pth_dummy.c,v 1.1 2010/02/26 18:54:20 pooka Exp $"); | | 30 | __RCSID("$NetBSD: rumpuser_pth_dummy.c,v 1.2 2011/05/23 20:49:08 joerg Exp $"); |
31 | #endif /* !lint */ | | 31 | #endif /* !lint */ |
32 | | | 32 | |
33 | #include <sys/time.h> | | 33 | #include <sys/time.h> |
34 | | | 34 | |
35 | #include <assert.h> | | 35 | #include <assert.h> |
36 | #include <errno.h> | | 36 | #include <errno.h> |
37 | #include <stdlib.h> | | 37 | #include <stdlib.h> |
38 | #include <stdio.h> | | 38 | #include <stdio.h> |
39 | #include <string.h> | | 39 | #include <string.h> |
40 | #include <stdint.h> | | 40 | #include <stdint.h> |
41 | | | 41 | |
42 | #include <rump/rumpuser.h> | | 42 | #include <rump/rumpuser.h> |
43 | | | 43 | |
| @@ -87,26 +87,28 @@ rumpuser_biothread(void *arg) | | | @@ -87,26 +87,28 @@ rumpuser_biothread(void *arg) |
87 | int | | 87 | int |
88 | rumpuser_thread_create(void *(*f)(void *), void *arg, const char *thrname) | | 88 | rumpuser_thread_create(void *(*f)(void *), void *arg, const char *thrname) |
89 | { | | 89 | { |
90 | | | 90 | |
91 | fprintf(stderr, "rumpuser: threads not available\n"); | | 91 | fprintf(stderr, "rumpuser: threads not available\n"); |
92 | abort(); | | 92 | abort(); |
93 | return 0; | | 93 | return 0; |
94 | } | | 94 | } |
95 | | | 95 | |
96 | void | | 96 | void |
97 | rumpuser_thread_exit(void) | | 97 | rumpuser_thread_exit(void) |
98 | { | | 98 | { |
99 | | | 99 | |
| | | 100 | fprintf(stderr, "rumpuser: threads not available\n"); |
| | | 101 | abort(); |
100 | } | | 102 | } |
101 | | | 103 | |
102 | void | | 104 | void |
103 | rumpuser_mutex_init(struct rumpuser_mtx **mtx) | | 105 | rumpuser_mutex_init(struct rumpuser_mtx **mtx) |
104 | { | | 106 | { |
105 | | | 107 | |
106 | *mtx = calloc(1, sizeof(struct rumpuser_mtx)); | | 108 | *mtx = calloc(1, sizeof(struct rumpuser_mtx)); |
107 | } | | 109 | } |
108 | | | 110 | |
109 | void | | 111 | void |
110 | rumpuser_mutex_recursive_init(struct rumpuser_mtx **mtx) | | 112 | rumpuser_mutex_recursive_init(struct rumpuser_mtx **mtx) |
111 | { | | 113 | { |
112 | | | 114 | |