Thu Oct 2 19:37:23 2008 UTC ()
Remove rumpuser_yield().  Not only doesn't it really make sense
here, some kind soul made it completely empty.


(pooka)
diff -r1.49 -r1.50 src/sys/rump/librump/rumpkern/emul.c
diff -r1.11 -r1.12 src/sys/rump/librump/rumpkern/misc_stub.c
diff -r1.18 -r1.19 src/sys/rump/librump/rumpuser/rumpuser.c
diff -r1.22 -r1.23 src/sys/rump/librump/rumpuser/rumpuser.h

cvs diff -r1.49 -r1.50 src/sys/rump/librump/rumpkern/emul.c (expand / switch to unified diff)

--- 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
528void 528void
529suspendsched() 529suspendsched()
530{ 530{
531 531
532 panic("%s: not implemented", __func__); 532 panic("%s: not implemented", __func__);
533} 533}
534 534
535void 
536yield(void) 
537{ 
538 
539 rumpuser_yield(); 
540} 
541 
542 
543u_int 535u_int
544lwp_unsleep(lwp_t *l, bool cleanup) 536lwp_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
552vaddr_t 544vaddr_t
553calc_cache_size(struct vm_map *map, int pct, int va_pct) 545calc_cache_size(struct vm_map *map, int pct, int va_pct)
554{ 546{
555 paddr_t t; 547 paddr_t t;

cvs diff -r1.11 -r1.12 src/sys/rump/librump/rumpkern/Attic/misc_stub.c (expand / switch to unified diff)

--- 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 */
43int nbpg = 4096; 43int nbpg = 4096;
44#endif 44#endif
45 45
46void 46void
 47yield(void)
 48{
 49
 50 /*
 51 * Do nothing - doesn't really make sense as we're being
 52 * scheduled anyway.
 53 */
 54 return;
 55}
 56
 57void
47preempt() 58preempt()
48{ 59{
49 60
 61 /* see yield */
50 return; 62 return;
51} 63}
52 64
53void 65void
54knote(struct klist *list, long hint) 66knote(struct klist *list, long hint)
55{ 67{
56 68
57 return; 69 return;
58} 70}
59 71
60struct cpu_info * 72struct cpu_info *
61cpu_lookup_byindex(u_int index) 73cpu_lookup_byindex(u_int index)
62{ 74{

cvs diff -r1.18 -r1.19 src/sys/rump/librump/rumpuser/Attic/rumpuser.c (expand / switch to unified diff)

--- 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 *
283rumpuser_realpath(const char *path, char resolvedname[MAXPATHLEN], int *error) 283rumpuser_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
296void 
297rumpuser_yield(void) 
298{ 
299 
300} 
301 
302#ifdef __linux__ 296#ifdef __linux__
303/* eewww */ 297/* eewww */
304size_t strlcpy(char *, const char *, size_t); 298size_t strlcpy(char *, const char *, size_t);
305uint32_t arc4random(void); 299uint32_t arc4random(void);
306size_t 300size_t
307strlcpy(char *dest, const char *src, size_t size) 301strlcpy(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}

cvs diff -r1.22 -r1.23 src/sys/rump/librump/rumpuser/Attic/rumpuser.h (expand / switch to unified diff)

--- 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
56void rumpuser_write_bio(int, const void *, size_t, off_t, void *); 56void rumpuser_write_bio(int, const void *, size_t, off_t, void *);
57 57
58int rumpuser_gettimeofday(struct timeval *, int *); 58int rumpuser_gettimeofday(struct timeval *, int *);
59int rumpuser_getenv(const char *, char *, size_t, int *); 59int rumpuser_getenv(const char *, char *, size_t, int *);
60 60
61uint16_t rumpuser_bswap16(uint16_t); 61uint16_t rumpuser_bswap16(uint16_t);
62uint32_t rumpuser_bswap32(uint32_t); 62uint32_t rumpuser_bswap32(uint32_t);
63uint64_t rumpuser_bswap64(uint64_t); 63uint64_t rumpuser_bswap64(uint64_t);
64 64
65int rumpuser_gethostname(char *, size_t, int *); 65int rumpuser_gethostname(char *, size_t, int *);
66 66
67char *rumpuser_realpath(const char *, char *, int *); 67char *rumpuser_realpath(const char *, char *, int *);
68 68
69void rumpuser_yield(void); 
70 
71/* rumpuser_pth */ 69/* rumpuser_pth */
72 70
73int rumpuser_thrinit(void); 71int rumpuser_thrinit(void);
74void rumpuser_thrdestroy(void); 72void rumpuser_thrdestroy(void);
75 73
76int rumpuser_thread_create(void *(*f)(void *), void *); 74int rumpuser_thread_create(void *(*f)(void *), void *);
77void rumpuser_thread_exit(void); 75void rumpuser_thread_exit(void);
78 76
79struct rumpuser_mtx; 77struct rumpuser_mtx;
80 78
81void rumpuser_mutex_init(struct rumpuser_mtx **); 79void rumpuser_mutex_init(struct rumpuser_mtx **);
82void rumpuser_mutex_recursive_init(struct rumpuser_mtx **); 80void rumpuser_mutex_recursive_init(struct rumpuser_mtx **);
83void rumpuser_mutex_enter(struct rumpuser_mtx *); 81void rumpuser_mutex_enter(struct rumpuser_mtx *);