Deleted Added
full compact
subr_sleepqueue.c (139804) subr_sleepqueue.c (141616)
1/*-
2 * Copyright (c) 2004 John Baldwin <jhb@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

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

57 * pre-existing abuse of that API. The same lock must also be held when
58 * awakening threads, though that is currently only enforced for condition
59 * variables.
60 */
61
62#include "opt_sleepqueue_profiling.h"
63
64#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004 John Baldwin <jhb@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

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

57 * pre-existing abuse of that API. The same lock must also be held when
58 * awakening threads, though that is currently only enforced for condition
59 * variables.
60 */
61
62#include "opt_sleepqueue_profiling.h"
63
64#include <sys/cdefs.h>
65__FBSDID("$FreeBSD: head/sys/kern/subr_sleepqueue.c 139804 2005-01-06 23:35:40Z imp $");
65__FBSDID("$FreeBSD: head/sys/kern/subr_sleepqueue.c 141616 2005-02-10 12:02:37Z phk $");
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/lock.h>
70#include <sys/kernel.h>
71#include <sys/ktr.h>
72#include <sys/malloc.h>
73#include <sys/mutex.h>

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

133SYSCTL_NODE(_debug, OID_AUTO, sleepq, CTLFLAG_RD, 0, "sleepq profiling");
134SYSCTL_NODE(_debug_sleepq, OID_AUTO, chains, CTLFLAG_RD, 0,
135 "sleepq chain stats");
136SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth,
137 0, "maxmimum depth achieved of a single chain");
138#endif
139static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
140
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/lock.h>
70#include <sys/kernel.h>
71#include <sys/ktr.h>
72#include <sys/malloc.h>
73#include <sys/mutex.h>

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

133SYSCTL_NODE(_debug, OID_AUTO, sleepq, CTLFLAG_RD, 0, "sleepq profiling");
134SYSCTL_NODE(_debug_sleepq, OID_AUTO, chains, CTLFLAG_RD, 0,
135 "sleepq chain stats");
136SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth,
137 0, "maxmimum depth achieved of a single chain");
138#endif
139static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
140
141MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
141static MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
142
143/*
144 * Prototypes for non-exported routines.
145 */
146static int sleepq_check_timeout(void);
147static void sleepq_switch(void *wchan);
148static void sleepq_timeout(void *arg);
149static void sleepq_remove_thread(struct sleepqueue *sq, struct thread *td);

--- 721 unchanged lines hidden ---
142
143/*
144 * Prototypes for non-exported routines.
145 */
146static int sleepq_check_timeout(void);
147static void sleepq_switch(void *wchan);
148static void sleepq_timeout(void *arg);
149static void sleepq_remove_thread(struct sleepqueue *sq, struct thread *td);

--- 721 unchanged lines hidden ---