Deleted Added
full compact
kern_condvar.c (247785) kern_condvar.c (255745)
1/*-
2 * Copyright (c) 2000 Jake Burkholder <jake@freebsd.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Jake Burkholder <jake@freebsd.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/kern_condvar.c 247785 2013-03-04 12:20:48Z davide $");
28__FBSDID("$FreeBSD: head/sys/kern/kern_condvar.c 255745 2013-09-20 23:06:21Z davide $");
29
30#include "opt_ktrace.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/proc.h>

--- 55 unchanged lines hidden (view full) ---

92 * held when cv_signal or cv_broadcast are called.
93 */
94void
95_cv_wait(struct cv *cvp, struct lock_object *lock)
96{
97 WITNESS_SAVE_DECL(lock_witness);
98 struct lock_class *class;
99 struct thread *td;
29
30#include "opt_ktrace.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/proc.h>

--- 55 unchanged lines hidden (view full) ---

92 * held when cv_signal or cv_broadcast are called.
93 */
94void
95_cv_wait(struct cv *cvp, struct lock_object *lock)
96{
97 WITNESS_SAVE_DECL(lock_witness);
98 struct lock_class *class;
99 struct thread *td;
100 int lock_state;
100 uintptr_t lock_state;
101
102 td = curthread;
103 lock_state = 0;
104#ifdef KTRACE
105 if (KTRPOINT(td, KTR_CSW))
106 ktrcsw(1, 0, cv_wmesg(cvp));
107#endif
108 CV_ASSERT(cvp, lock, td);

--- 100 unchanged lines hidden (view full) ---

209 * restarted if possible.
210 */
211int
212_cv_wait_sig(struct cv *cvp, struct lock_object *lock)
213{
214 WITNESS_SAVE_DECL(lock_witness);
215 struct lock_class *class;
216 struct thread *td;
101
102 td = curthread;
103 lock_state = 0;
104#ifdef KTRACE
105 if (KTRPOINT(td, KTR_CSW))
106 ktrcsw(1, 0, cv_wmesg(cvp));
107#endif
108 CV_ASSERT(cvp, lock, td);

--- 100 unchanged lines hidden (view full) ---

209 * restarted if possible.
210 */
211int
212_cv_wait_sig(struct cv *cvp, struct lock_object *lock)
213{
214 WITNESS_SAVE_DECL(lock_witness);
215 struct lock_class *class;
216 struct thread *td;
217 int lock_state, rval;
217 uintptr_t lock_state;
218 int rval;
218
219 td = curthread;
220 lock_state = 0;
221#ifdef KTRACE
222 if (KTRPOINT(td, KTR_CSW))
223 ktrcsw(1, 0, cv_wmesg(cvp));
224#endif
225 CV_ASSERT(cvp, lock, td);

--- 231 unchanged lines hidden ---
219
220 td = curthread;
221 lock_state = 0;
222#ifdef KTRACE
223 if (KTRPOINT(td, KTR_CSW))
224 ktrcsw(1, 0, cv_wmesg(cvp));
225#endif
226 CV_ASSERT(cvp, lock, td);

--- 231 unchanged lines hidden ---