Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ThreadSwitchWithDelay in filesystem callbacks

3 views
Skip to first unread message

krasimir_h

unread,
Jun 30, 2006, 12:28:10 PM6/30/06
to
Hi,

From the samples on the Novell's website like this one:

void NLM_SignalHandler(int sig)
{
switch(sig)
{
case SIGTERM:
while(NLM_threadCnt != 0)
ThreadSwitchWithDelay();
break;
}
return;
}

I understand that it is OK to call ThreadSwitchWithDelay
from your SIGTERM handler although it is executed by an OS thread
which may or may not have a full CLIB context.
I have two questions:
1. Is ThreadSwitchWithDelay() among the functions which are supposed to
need a full CLIB context?
2. Is it OK to call ThreadSwitchWithDelay in a callback registered with
NWAddFSMonitorHook before giving the calling thread a CLIB context using
SetThreadGroupID in case the thread regestering the hook had its
ThreadContextSpecifier set to NO_CONTEXT?

TIA

Best regards
Krasimir

Jeff Lawson

unread,
Jun 30, 2006, 12:33:18 PM6/30/06
to
1. ThreadSwitchWithDelay() doesn't need Clib context.
2. Yes, as long as that call back can legally sleep (I am guessing that it
can or you wouldn't be asking the question).

>>> On 6/30/2006 at 10:28 AM, in message
<uicpg.29$6c7...@prv-forum2.provo.novell.com>,

krasimir_h

unread,
Jun 30, 2006, 1:14:24 PM6/30/06
to
Hi Jeff,
Thank you very much.
1. Great! :-)
2. Yes, it is a PRE... callback

Krasimir

0 new messages