about the Pth whitepaper...
Christopher Quinn <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
hello, i carefully read the original whitepaper but there were a couple of lines of the model implementation whose meaning eludes me! i know there is a mailing list specifically for Pth but i am loitering here on account of another matter anyway (previous post), so ... my question relates to step 7 and the restoration of the old 'alternative' stack: sigaltstack(NULL,&ss); ss.ss_flags = SS_DISABLE; sigaltstack(&ss,NULL); if(! (oss.ss_flags & SS_DISABLE) ) sigaltstack(&oss,NULL); firstly, it retrieves the current alt-stack, disables it then re-instates it. but why is it of any use to keep around the stack description of another thread? surely it has served its purpose and can be immediately replaced with oss. secondly, oss is only re-instated if not disabled. but why make this check? if it was disabled before entry to mctx_create what harm is there in leaving it this way on return? why leave in place the new thread's stack details (disabled) if oss was itself disabled? any insight appreciated! - chris