subr_turnstile.c
Source contains an unconditional loopC declares a character or byte buffer
SHA-256486d893eefe0b516fb65f44ed96d71c0be1e450388e9633c902d3e9b1bd0bb93
MaleculeO(Er)H(Db₂)
Evidence
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must repr …
20:6… PLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIAB …
57:76… lock
58 * and removes it from the hash table.
59 */
60
61#include <sys/cdefs.h>
62#include "opt_ddb.h"
63#include "opt_turnstile_profiling.h"
64#include "opt_sched.h"
65
66#include <sys/param.h>
67#include <sys/systm.h>
68#include <sys/kdb.h>
69#include <sys/kernel.h>
70#include <sys/ktr.h>
71#include <sys/lock.h>
72#include <sys/mutex.h>
73#include <sys/proc.h>
74#include <sys/queue.h>
75#include <sys/sched.h>
76#include <sys/sdt.h>
77#include <sys/sysctl.h>
78#include <sys/turnstile.h>
79
80#include <vm/uma.h>
81
82#ifdef DDB
83#include <ddb/ddb.h>
84#include <sys/lockmgr.h>
85#include <sys/sx.h>
86#endif
87
88/*
89 * Constants for the hash table of turnstile chains. TC_SHIFT is a magic
90 * number …
339:40… >ts_lock);
340 td1 = TAILQ_PREV(td, threadqueue, td_lockq);
341 td2 = TAILQ_NEXT(td, td_lockq);
342 if ((td1 != NULL && td->td_priority < td1->td_priority) ||
343 (td2 != NULL && td->td_priority > td2->td_prior …
398:7… urnstile_profiling(void *arg)
399{
400 struct sysctl_oid *chain_oid;
401 char chain_name[10];
402 int i;
403
⋯4 lines