1412042e2SAndrew Turner /*- 2412042e2SAndrew Turner * Copyright (c) 2001 Jake Burkholder <jake@FreeBSD.org> 3412042e2SAndrew Turner * All rights reserved. 4412042e2SAndrew Turner * 5412042e2SAndrew Turner * Redistribution and use in source and binary forms, with or without 6412042e2SAndrew Turner * modification, are permitted provided that the following conditions 7412042e2SAndrew Turner * are met: 8412042e2SAndrew Turner * 1. Redistributions of source code must retain the above copyright 9412042e2SAndrew Turner * notice, this list of conditions and the following disclaimer. 10412042e2SAndrew Turner * 2. Redistributions in binary form must reproduce the above copyright 11412042e2SAndrew Turner * notice, this list of conditions and the following disclaimer in the 12412042e2SAndrew Turner * documentation and/or other materials provided with the distribution. 13412042e2SAndrew Turner * 14412042e2SAndrew Turner * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15412042e2SAndrew Turner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16412042e2SAndrew Turner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17412042e2SAndrew Turner * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18412042e2SAndrew Turner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19412042e2SAndrew Turner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20412042e2SAndrew Turner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21412042e2SAndrew Turner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22412042e2SAndrew Turner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23412042e2SAndrew Turner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24412042e2SAndrew Turner * SUCH DAMAGE. 25412042e2SAndrew Turner */ 26412042e2SAndrew Turner 27*d5d97bedSMike Karels #ifdef __arm__ 28*d5d97bedSMike Karels #include <arm/runq.h> 29*d5d97bedSMike Karels #else /* !__arm__ */ 30*d5d97bedSMike Karels 31412042e2SAndrew Turner #ifndef _MACHINE_RUNQ_H_ 32412042e2SAndrew Turner #define _MACHINE_RUNQ_H_ 33412042e2SAndrew Turner 34412042e2SAndrew Turner #define RQB_LEN (1) /* Number of priority status words. */ 35412042e2SAndrew Turner #define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */ 36412042e2SAndrew Turner #define RQB_BPW (1<<RQB_L2BPW) /* Bits in an rqb_word_t. */ 37412042e2SAndrew Turner 38412042e2SAndrew Turner #define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1))) 39412042e2SAndrew Turner #define RQB_WORD(pri) ((pri) >> RQB_L2BPW) 40412042e2SAndrew Turner 41412042e2SAndrew Turner #define RQB_FFS(word) (ffsl(word) - 1) 42412042e2SAndrew Turner 43412042e2SAndrew Turner /* 44412042e2SAndrew Turner * Type of run queue status word. 45412042e2SAndrew Turner */ 46412042e2SAndrew Turner typedef unsigned long rqb_word_t; 47412042e2SAndrew Turner 48412042e2SAndrew Turner #endif 49*d5d97bedSMike Karels 50*d5d97bedSMike Karels #endif /* !__arm__ */ 51