| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: subr_pserialize.c,v 1.1 2011/07/30 17:01:04 christos Exp $ */ | | 1 | /* $NetBSD: subr_pserialize.c,v 1.2 2011/08/01 15:26:31 he Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -28,32 +28,33 @@ | | | @@ -28,32 +28,33 @@ |
28 | | | 28 | |
29 | /* | | 29 | /* |
30 | * Passive serialization. | | 30 | * Passive serialization. |
31 | * | | 31 | * |
32 | * Implementation accurately matches the lapsed US patent 4809168, therefore | | 32 | * Implementation accurately matches the lapsed US patent 4809168, therefore |
33 | * code is patent-free in the United States. Your use of this code is at | | 33 | * code is patent-free in the United States. Your use of this code is at |
34 | * your own risk. | | 34 | * your own risk. |
35 | * | | 35 | * |
36 | * Note for NetBSD developers: all changes to this source file must be | | 36 | * Note for NetBSD developers: all changes to this source file must be |
37 | * approved by the <core>. | | 37 | * approved by the <core>. |
38 | */ | | 38 | */ |
39 | | | 39 | |
40 | #include <sys/cdefs.h> | | 40 | #include <sys/cdefs.h> |
41 | __KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.1 2011/07/30 17:01:04 christos Exp $"); | | 41 | __KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.2 2011/08/01 15:26:31 he Exp $"); |
42 | | | 42 | |
43 | #include <sys/param.h> | | 43 | #include <sys/param.h> |
44 | | | 44 | |
45 | #include <sys/condvar.h> | | 45 | #include <sys/condvar.h> |
46 | #include <sys/cpu.h> | | 46 | #include <sys/cpu.h> |
| | | 47 | #include <sys/evcnt.h> |
47 | #include <sys/kmem.h> | | 48 | #include <sys/kmem.h> |
48 | #include <sys/mutex.h> | | 49 | #include <sys/mutex.h> |
49 | #include <sys/pserialize.h> | | 50 | #include <sys/pserialize.h> |
50 | #include <sys/queue.h> | | 51 | #include <sys/queue.h> |
51 | #include <sys/xcall.h> | | 52 | #include <sys/xcall.h> |
52 | | | 53 | |
53 | struct pserialize { | | 54 | struct pserialize { |
54 | TAILQ_ENTRY(pserialize) psz_chain; | | 55 | TAILQ_ENTRY(pserialize) psz_chain; |
55 | lwp_t * psz_owner; | | 56 | lwp_t * psz_owner; |
56 | kcondvar_t psz_notifier; | | 57 | kcondvar_t psz_notifier; |
57 | kcpuset_t * psz_target; | | 58 | kcpuset_t * psz_target; |
58 | kcpuset_t * psz_pass; | | 59 | kcpuset_t * psz_pass; |
59 | }; | | 60 | }; |