Remove rumpuser_yield(). Not only doesn't it really make sense here, some kind soul made it completely empty.diff -r1.49 -r1.50 src/sys/rump/librump/rumpkern/emul.c
(pooka)
--- src/sys/rump/librump/rumpkern/emul.c 2008/09/30 19:25:56 1.49
+++ src/sys/rump/librump/rumpkern/emul.c 2008/10/02 19:37:23 1.50
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: emul.c,v 1.49 2008/09/30 19:25:56 pooka Exp $ */ | 1 | /* $NetBSD: emul.c,v 1.50 2008/10/02 19:37:23 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by Google Summer of Code. | 6 | * Development of this software was supported by Google Summer of Code. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -522,34 +522,26 @@ kpause(const char *wmesg, bool intr, int | @@ -522,34 +522,26 @@ kpause(const char *wmesg, bool intr, int | |||
522 | if (rv) | 522 | if (rv) | |
523 | return error; | 523 | return error; | |
524 | 524 | |||
525 | return 0; | 525 | return 0; | |
526 | } | 526 | } | |
527 | 527 | |||
528 | void | 528 | void | |
529 | suspendsched() | 529 | suspendsched() | |
530 | { | 530 | { | |
531 | 531 | |||
532 | panic("%s: not implemented", __func__); | 532 | panic("%s: not implemented", __func__); | |
533 | } | 533 | } | |
534 | 534 | |||
535 | void | |||
536 | yield(void) | |||
537 | { | |||
538 | ||||
539 | rumpuser_yield(); | |||
540 | } | |||
541 | ||||
542 | ||||
543 | u_int | 535 | u_int | |
544 | lwp_unsleep(lwp_t *l, bool cleanup) | 536 | lwp_unsleep(lwp_t *l, bool cleanup) | |
545 | { | 537 | { | |
546 | 538 | |||
547 | KASSERT(mutex_owned(l->l_mutex)); | 539 | KASSERT(mutex_owned(l->l_mutex)); | |
548 | 540 | |||
549 | return (*l->l_syncobj->sobj_unsleep)(l, cleanup); | 541 | return (*l->l_syncobj->sobj_unsleep)(l, cleanup); | |
550 | } | 542 | } | |
551 | 543 | |||
552 | vaddr_t | 544 | vaddr_t | |
553 | calc_cache_size(struct vm_map *map, int pct, int va_pct) | 545 | calc_cache_size(struct vm_map *map, int pct, int va_pct) | |
554 | { | 546 | { | |
555 | paddr_t t; | 547 | paddr_t t; |
--- src/sys/rump/librump/rumpkern/Attic/misc_stub.c 2008/08/01 19:34:51 1.11
+++ src/sys/rump/librump/rumpkern/Attic/misc_stub.c 2008/10/02 19:37:23 1.12
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: misc_stub.c,v 1.11 2008/08/01 19:34:51 pooka Exp $ */ | 1 | /* $NetBSD: misc_stub.c,v 1.12 2008/10/02 19:37:23 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by Google Summer of Code. | 6 | * Development of this software was supported by Google Summer of Code. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -34,29 +34,41 @@ | @@ -34,29 +34,41 @@ | |||
34 | #include <sys/systm.h> | 34 | #include <sys/systm.h> | |
35 | #include <sys/cpu.h> | 35 | #include <sys/cpu.h> | |
36 | #include <sys/evcnt.h> | 36 | #include <sys/evcnt.h> | |
37 | 37 | |||
38 | #ifdef __sparc__ | 38 | #ifdef __sparc__ | |
39 | /* | 39 | /* | |
40 | * XXX Least common denominator - smallest sparc pagesize. | 40 | * XXX Least common denominator - smallest sparc pagesize. | |
41 | * Could just be declared, pooka says rump doesn't use ioctl. | 41 | * Could just be declared, pooka says rump doesn't use ioctl. | |
42 | */ | 42 | */ | |
43 | int nbpg = 4096; | 43 | int nbpg = 4096; | |
44 | #endif | 44 | #endif | |
45 | 45 | |||
46 | void | 46 | void | |
47 | yield(void) | |||
48 | { | |||
49 | ||||
50 | /* | |||
51 | * Do nothing - doesn't really make sense as we're being | |||
52 | * scheduled anyway. | |||
53 | */ | |||
54 | return; | |||
55 | } | |||
56 | ||||
57 | void | |||
47 | preempt() | 58 | preempt() | |
48 | { | 59 | { | |
49 | 60 | |||
61 | /* see yield */ | |||
50 | return; | 62 | return; | |
51 | } | 63 | } | |
52 | 64 | |||
53 | void | 65 | void | |
54 | knote(struct klist *list, long hint) | 66 | knote(struct klist *list, long hint) | |
55 | { | 67 | { | |
56 | 68 | |||
57 | return; | 69 | return; | |
58 | } | 70 | } | |
59 | 71 | |||
60 | struct cpu_info * | 72 | struct cpu_info * | |
61 | cpu_lookup_byindex(u_int index) | 73 | cpu_lookup_byindex(u_int index) | |
62 | { | 74 | { |
--- src/sys/rump/librump/rumpuser/Attic/rumpuser.c 2008/07/29 13:17:47 1.18
+++ src/sys/rump/librump/rumpuser/Attic/rumpuser.c 2008/10/02 19:37:23 1.19
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: rumpuser.c,v 1.18 2008/07/29 13:17:47 pooka Exp $ */ | 1 | /* $NetBSD: rumpuser.c,v 1.19 2008/10/02 19:37:23 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by Google Summer of Code | 6 | * Development of this software was supported by Google Summer of Code | |
7 | * and the Finnish Cultural Foundation. | 7 | * and the Finnish Cultural Foundation. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -283,32 +283,26 @@ char * | @@ -283,32 +283,26 @@ char * | |||
283 | rumpuser_realpath(const char *path, char resolvedname[MAXPATHLEN], int *error) | 283 | rumpuser_realpath(const char *path, char resolvedname[MAXPATHLEN], int *error) | |
284 | { | 284 | { | |
285 | char *rv; | 285 | char *rv; | |
286 | 286 | |||
287 | rv = realpath(path, resolvedname); | 287 | rv = realpath(path, resolvedname); | |
288 | if (rv == NULL) | 288 | if (rv == NULL) | |
289 | *error = errno; | 289 | *error = errno; | |
290 | else | 290 | else | |
291 | *error = 0; | 291 | *error = 0; | |
292 | 292 | |||
293 | return rv; | 293 | return rv; | |
294 | } | 294 | } | |
295 | 295 | |||
296 | void | |||
297 | rumpuser_yield(void) | |||
298 | { | |||
299 | ||||
300 | } | |||
301 | ||||
302 | #ifdef __linux__ | 296 | #ifdef __linux__ | |
303 | /* eewww */ | 297 | /* eewww */ | |
304 | size_t strlcpy(char *, const char *, size_t); | 298 | size_t strlcpy(char *, const char *, size_t); | |
305 | uint32_t arc4random(void); | 299 | uint32_t arc4random(void); | |
306 | size_t | 300 | size_t | |
307 | strlcpy(char *dest, const char *src, size_t size) | 301 | strlcpy(char *dest, const char *src, size_t size) | |
308 | { | 302 | { | |
309 | 303 | |||
310 | strncpy(dest, src, size-1); | 304 | strncpy(dest, src, size-1); | |
311 | dest[size-1] = '\0'; | 305 | dest[size-1] = '\0'; | |
312 | 306 | |||
313 | return strlen(dest); | 307 | return strlen(dest); | |
314 | } | 308 | } |
--- src/sys/rump/librump/rumpuser/Attic/rumpuser.h 2008/08/08 13:57:59 1.22
+++ src/sys/rump/librump/rumpuser/Attic/rumpuser.h 2008/10/02 19:37:23 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: rumpuser.h,v 1.22 2008/08/08 13:57:59 pooka Exp $ */ | 1 | /* $NetBSD: rumpuser.h,v 1.23 2008/10/02 19:37:23 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by Google Summer of Code. | 6 | * Development of this software was supported by Google Summer of Code. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -56,28 +56,26 @@ void rumpuser_read_bio(int, void *, size | @@ -56,28 +56,26 @@ void rumpuser_read_bio(int, void *, size | |||
56 | void rumpuser_write_bio(int, const void *, size_t, off_t, void *); | 56 | void rumpuser_write_bio(int, const void *, size_t, off_t, void *); | |
57 | 57 | |||
58 | int rumpuser_gettimeofday(struct timeval *, int *); | 58 | int rumpuser_gettimeofday(struct timeval *, int *); | |
59 | int rumpuser_getenv(const char *, char *, size_t, int *); | 59 | int rumpuser_getenv(const char *, char *, size_t, int *); | |
60 | 60 | |||
61 | uint16_t rumpuser_bswap16(uint16_t); | 61 | uint16_t rumpuser_bswap16(uint16_t); | |
62 | uint32_t rumpuser_bswap32(uint32_t); | 62 | uint32_t rumpuser_bswap32(uint32_t); | |
63 | uint64_t rumpuser_bswap64(uint64_t); | 63 | uint64_t rumpuser_bswap64(uint64_t); | |
64 | 64 | |||
65 | int rumpuser_gethostname(char *, size_t, int *); | 65 | int rumpuser_gethostname(char *, size_t, int *); | |
66 | 66 | |||
67 | char *rumpuser_realpath(const char *, char *, int *); | 67 | char *rumpuser_realpath(const char *, char *, int *); | |
68 | 68 | |||
69 | void rumpuser_yield(void); | |||
70 | ||||
71 | /* rumpuser_pth */ | 69 | /* rumpuser_pth */ | |
72 | 70 | |||
73 | int rumpuser_thrinit(void); | 71 | int rumpuser_thrinit(void); | |
74 | void rumpuser_thrdestroy(void); | 72 | void rumpuser_thrdestroy(void); | |
75 | 73 | |||
76 | int rumpuser_thread_create(void *(*f)(void *), void *); | 74 | int rumpuser_thread_create(void *(*f)(void *), void *); | |
77 | void rumpuser_thread_exit(void); | 75 | void rumpuser_thread_exit(void); | |
78 | 76 | |||
79 | struct rumpuser_mtx; | 77 | struct rumpuser_mtx; | |
80 | 78 | |||
81 | void rumpuser_mutex_init(struct rumpuser_mtx **); | 79 | void rumpuser_mutex_init(struct rumpuser_mtx **); | |
82 | void rumpuser_mutex_recursive_init(struct rumpuser_mtx **); | 80 | void rumpuser_mutex_recursive_init(struct rumpuser_mtx **); | |
83 | void rumpuser_mutex_enter(struct rumpuser_mtx *); | 81 | void rumpuser_mutex_enter(struct rumpuser_mtx *); |