| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: lwp.h,v 1.159.2.1.2.1 2012/11/01 16:45:04 matt Exp $ */ | | 1 | /* $NetBSD: lwp.h,v 1.159.2.1.2.2 2012/11/28 22:52:52 matt Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 | | 4 | * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 |
5 | * The NetBSD Foundation, Inc. | | 5 | * The NetBSD Foundation, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to The NetBSD Foundation | | 8 | * This code is derived from software contributed to The NetBSD Foundation |
9 | * by Nathan J. Williams and Andrew Doran. | | 9 | * by Nathan J. Williams and Andrew Doran. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -406,27 +406,27 @@ lwp_lendpri(lwp_t *l, pri_t pri) | | | @@ -406,27 +406,27 @@ lwp_lendpri(lwp_t *l, pri_t pri) |
406 | if (l->l_inheritedprio == pri) | | 406 | if (l->l_inheritedprio == pri) |
407 | return; | | 407 | return; |
408 | | | 408 | |
409 | (*l->l_syncobj->sobj_lendpri)(l, pri); | | 409 | (*l->l_syncobj->sobj_lendpri)(l, pri); |
410 | KASSERT(l->l_inheritedprio == pri); | | 410 | KASSERT(l->l_inheritedprio == pri); |
411 | } | | 411 | } |
412 | | | 412 | |
413 | static inline pri_t | | 413 | static inline pri_t |
414 | lwp_eprio(lwp_t *l) | | 414 | lwp_eprio(lwp_t *l) |
415 | { | | 415 | { |
416 | pri_t pri; | | 416 | pri_t pri; |
417 | | | 417 | |
418 | pri = l->l_priority; | | 418 | pri = l->l_priority; |
419 | if (l->l_kpriority && pri < PRI_KERNEL) | | 419 | if ((l->l_flag & LW_SYSTEM) == 0 && l->l_kpriority && pri < PRI_KERNEL) |
420 | pri = (pri >> 1) + l->l_kpribase; | | 420 | pri = (pri >> 1) + l->l_kpribase; |
421 | return MAX(l->l_inheritedprio, pri); | | 421 | return MAX(l->l_inheritedprio, pri); |
422 | } | | 422 | } |
423 | | | 423 | |
424 | int lwp_create(lwp_t *, struct proc *, vaddr_t, int, | | 424 | int lwp_create(lwp_t *, struct proc *, vaddr_t, int, |
425 | void *, size_t, void (*)(void *), void *, lwp_t **, int); | | 425 | void *, size_t, void (*)(void *), void *, lwp_t **, int); |
426 | | | 426 | |
427 | /* | | 427 | /* |
428 | * XXX _MODULE | | 428 | * XXX _MODULE |
429 | * We should provide real stubs for the below that modules can use. | | 429 | * We should provide real stubs for the below that modules can use. |
430 | */ | | 430 | */ |
431 | | | 431 | |
432 | static inline void | | 432 | static inline void |