Article View: comp.os.os2.programmer
Article #733Re: CreateThread using malloc
From: Larry Salomon, Jr.
Date: Thu, 16 Apr 1992 21:54
Date: Thu, 16 Apr 1992 21:54
27 lines
1858 bytes
1858 bytes
In <jj91eqk@twilight.wpd.sgi.com>, fanj@remb6489.wpd.sgi.com (Fan Jiao) writes: > >I was using CreateThread call to create several threads. Before that I was >using 'malloc' to create the stack which is needed as one of the parameters >for 'CreateThread' call. I assume you mean DosCreateThread. >I donot know if use of 'malloc' is proper. I also looked into the >use of 'DosAllocSeg'. And I got "wrong ring level" error msg while using >'DosAllocSeg'. If you are writing a 16-bit application, DosAllocSeg should work. Are you passing it the proper parameters? If you are writing a 32-bit application, DosCreateThread will create the stack for you, so you don't need to do it. Cheers, Larry Salomon, Jr. (aka 'Q') LARRYS@YKTVMV.BITNET OS/2 Applications and Tools larrys@watson.ibm.com IBM T.J. Watson Research Center larrys@ibmman.watson.ibm.com Yorktown Heights, NY larrys@ibmman2.watson.ibm.com Disclaimer: The statements and/or opinions stated above are strictly my own and do not reflect the views of my employer. Additionally, I have a reputation for being obnoxious, so don't take any personal attacks too seriously.
Technical Details
Message-ID:
<1992Apr16.205621.17351@watson.ibm.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!yktnews!admin!watson!larrysReferences:
<jj91eqk@twilight.wpd.sgi.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer,comp.os.os2 Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!yktnews!admin!watson!larrys From: larrys@watson.ibm.com (Larry Salomon, Jr.) Subject: Re: CreateThread using malloc Message-ID: <1992Apr16.205621.17351@watson.ibm.com> Sender: larrys@watson.ibm.com Date: Thu, 16 Apr 1992 21:54:10 GMT News-Software: NewsKit 1.2 - LaMail Reply-To: larrys@watson.ibm.com Disclaimer: This posting represents the poster's views, not necessarily those of IBM References: <jj91eqk@twilight.wpd.sgi.com> Nntp-Posting-Host: ibmman2.watson.ibm.com Organization: IBM Research Lines: 27