mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
If thread mode is not activated yet, don't do extra work.
Reviewed by: deischen
This commit is contained in:
parent
e32ea5472a
commit
94fd4648c3
2 changed files with 8 additions and 0 deletions
|
|
@ -259,6 +259,8 @@ _pthread_testcancel(void)
|
|||
void
|
||||
_thr_enter_cancellation_point(struct pthread *thread)
|
||||
{
|
||||
if (!_kse_isthreaded())
|
||||
return;
|
||||
/* Look for a cancellation before we block: */
|
||||
THR_SCHED_LOCK(thread, thread);
|
||||
testcancel(thread);
|
||||
|
|
@ -269,6 +271,8 @@ _thr_enter_cancellation_point(struct pthread *thread)
|
|||
void
|
||||
_thr_leave_cancellation_point(struct pthread *thread)
|
||||
{
|
||||
if (!_kse_isthreaded())
|
||||
return;
|
||||
THR_SCHED_LOCK(thread, thread);
|
||||
thread->cancelflags &= ~THR_AT_CANCEL_POINT;
|
||||
/* Look for a cancellation after we unblock: */
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ _pthread_testcancel(void)
|
|||
void
|
||||
_thr_enter_cancellation_point(struct pthread *thread)
|
||||
{
|
||||
if (!_kse_isthreaded())
|
||||
return;
|
||||
/* Look for a cancellation before we block: */
|
||||
THR_SCHED_LOCK(thread, thread);
|
||||
testcancel(thread);
|
||||
|
|
@ -269,6 +271,8 @@ _thr_enter_cancellation_point(struct pthread *thread)
|
|||
void
|
||||
_thr_leave_cancellation_point(struct pthread *thread)
|
||||
{
|
||||
if (!_kse_isthreaded())
|
||||
return;
|
||||
THR_SCHED_LOCK(thread, thread);
|
||||
thread->cancelflags &= ~THR_AT_CANCEL_POINT;
|
||||
/* Look for a cancellation after we unblock: */
|
||||
|
|
|
|||
Loading…
Reference in a new issue