Xref: utzoo comp.os.msdos.programmer:4327 comp.os.os2.programmer:560 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!linac!att!pacbell.com!tandem!netcom!resnicks From: resnicks@netcom.COM (Steve Resnick) Newsgroups: comp.os.msdos.programmer,comp.os.os2.programmer Subject: Info on Changing Stacks in protected mode Summary: What gives? Message-ID: <1991Mar29.155840.2626@netcom.COM> Date: 29 Mar 91 15:58:40 GMT Sender: resnicks@netcom.COM (Steve Resnick) Organization: Me? Organized? You gotta be kidding! Lines: 27 I saw this article in C User's Journal about multi-threaded C using setjmp/longjmp. This was something proposed to me a while ago, and thought I'd try and work up my own code. After looking at the code I realized that each thread is going to need a new stack. Assembler in hand, I write this fairly generic assembler routine which launches the new thread with a new stack. Everything works great until I run this under OS/2 rather than MS DOS. OS/2 will not let me clear interrupts while changing SS:SP. My question: Is it necessary to disable interrupts while switching stacks in protected mode? If so, what is the appropriate meathod under OS/2? Is there a call to prevent task switching/interrupt processing? Or, should it be implemented as part of an IOPL segment? Thanx for your support :) Steve -- ------------------------------------------------------------------------------- resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0, USNail: 530 Lawrence Expressway, Suite 374 Sunnyvale, Ca 94086 - In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null 0x2b |~ 0x2b, THAT is the question. The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2 -------------------------------------------------------------------------------