Deleted Added
full compact
kern_mutex.c (164159) kern_mutex.c (164246)
1/*-
2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $
30 */
31
32/*
33 * Machine independent bits of mutex implementation.
34 */
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $
30 */
31
32/*
33 * Machine independent bits of mutex implementation.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/kern/kern_mutex.c 164159 2006-11-11 03:18:07Z kmacy $");
37__FBSDID("$FreeBSD: head/sys/kern/kern_mutex.c 164246 2006-11-13 05:41:46Z kmacy $");
38
39#include "opt_adaptive_mutexes.h"
40#include "opt_ddb.h"
41#include "opt_global.h"
42#include "opt_mutex_wake_all.h"
43#include "opt_sched.h"
44
45#include <sys/param.h>

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

651 flags |= LO_DUPOK;
652 if (opts & MTX_NOPROFILE)
653 flags |= LO_NOPROFILE;
654
655 /* Initialize mutex. */
656 m->mtx_lock = MTX_UNOWNED;
657 m->mtx_recurse = 0;
658
38
39#include "opt_adaptive_mutexes.h"
40#include "opt_ddb.h"
41#include "opt_global.h"
42#include "opt_mutex_wake_all.h"
43#include "opt_sched.h"
44
45#include <sys/param.h>

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

651 flags |= LO_DUPOK;
652 if (opts & MTX_NOPROFILE)
653 flags |= LO_NOPROFILE;
654
655 /* Initialize mutex. */
656 m->mtx_lock = MTX_UNOWNED;
657 m->mtx_recurse = 0;
658
659 lock_profile_object_init(&m->mtx_object, name);
659 lock_profile_object_init(&m->mtx_object, class, name);
660 lock_init(&m->mtx_object, class, name, type, flags);
661}
662
663/*
664 * Remove lock `m' from all_mtx queue. We don't allow MTX_QUIET to be
665 * passed in as a flag here because if the corresponding mtx_init() was
666 * called with MTX_QUIET set, then it will already be set in the mutex's
667 * flags.

--- 89 unchanged lines hidden ---
660 lock_init(&m->mtx_object, class, name, type, flags);
661}
662
663/*
664 * Remove lock `m' from all_mtx queue. We don't allow MTX_QUIET to be
665 * passed in as a flag here because if the corresponding mtx_init() was
666 * called with MTX_QUIET set, then it will already be set in the mutex's
667 * flags.

--- 89 unchanged lines hidden ---