Groups > Novell > Novell Libc > Re: NXThreadCreate




NXThreadCreate

NXThreadCreate
Tue, 11 Dec 2007 22:46:20 GMT
I think I found a bug with my code.  I was calling NXThreadCreate with an 
active thread.  The call would not return from NXThreadCreate.  Since this 
is a guess on my part, does anyone know what would happen if I were to call 
NXThreadCreate with a context that was running on an active thread?

NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
&lPBThread->myThreadId);

Post Reply
Re: NXThreadCreate
Wed, 12 Dec 2007 22:35:00 GMT
It should return NX_EBUSY. Of course that is if indeed it is actually
active, which is not necessarily easy to discern.

Jeff Lawson
NetWare Core OS
LibC Engineering



>>> On 12/11/2007 at 3:46 PM, in message
<0rE7j.8185$k06.5573@kovat.provo.novell.com>, Bob
Piskac<bob@pbsoftware.com> wrote:
> I think I found a bug with my code.  I was calling NXThreadCreate with an

> 
> active thread.  The call would not return from NXThreadCreate.  Since 
> this 
> is a guess on my part, does anyone know what would happen if I were to 
> call 
> NXThreadCreate with a context that was running on an active thread?
> 
> NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
Post Reply
Re: NXThreadCreate
Sat, 15 Dec 2007 17:52:02 GMT
This may be totally unhelpful, but I'm curious what 
lPBThread->myContext.ciState is just prior to the call.

-- Bob

- - - - - - - - - - - - - - - - -
       Robert Charles Mahar
Traffic Shaping Engine for NetWare
    http://www.TrafficShaper.com
- - - - - - - - - - - - - - - - -


Bob Piskac wrote:
> I think I found a bug with my code.  I was calling NXThreadCreate with an 
> active thread.  The call would not return from NXThreadCreate.  Since this

> is a guess on my part, does anyone know what would happen if I were to call

> NXThreadCreate with a context that was running on an active thread?
> 
> NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
> &lPBThread->myThreadId);
> 
Post Reply
Re: NXThreadCreate
Thu, 20 Dec 2007 13:20:56 GMT
I will  print to the screen prior to the API call and after.  My application 
can run from 3 day to 4 months without a problem then it just locks up. 
Iput a lot of screen prints to find out what I am doing wrong.  The last 
output to the screen was "Before Call Thread".

ScreenLogWrite("Before Call Thread");
lResult = NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
&lPBThread->myThreadId);
ScreenLogWrite("After Call Thread");

"Robert Charles Mahar" <info@trafficshaper.com> wrote in message

news:6vU8j.9841$k06.4037@kovat.provo.novell.com...
> This may be totally unhelpful, but I'm curious what 
> lPBThread->myContext.ciState is just prior to the call.
>
> -- Bob
>
> - - - - - - - - - - - - - - - - -
>       Robert Charles Mahar
> Traffic Shaping Engine for NetWare
>    http://www.TrafficShaper.com
> - - - - - - - - - - - - - - - - -
>
>
> Bob Piskac wrote:
>> I think I found a bug with my code.  I was calling NXThreadCreate with
an 
>> active thread.  The call would not return from NXThreadCreate.  Since 
>> this is a guess on my part, does anyone know what would happen if I
were 
>> to call NXThreadCreate with a context that was running on an active 
>> thread?
>>
>> NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
>> &lPBThread->myThreadId);
>> 
Post Reply
Re: NXThreadCreate
Thu, 20 Dec 2007 16:06:25 GMT
I added the logging and will post the results when the software locks up.

Before Create Thread ffffffff
After Create Thread 1
Relay: 190.80.227.208 BL.SPAMCOP.NET 68.249.14.20
Before Create Thread ffffffff
After Create Thread 1
Relay: 91.122.18.98 cbl.abuseat.org ppp91-122-18-98.pppoe.avangard-dsl.ru
Before Create Thread ffffffff
After Create Thread 1
Client: 88.226.18.23 dsl88-226-4631.ttnet.net.tr

"Bob Piskac" <bob@pbsoftware.com> wrote in message 
news:Y_taj.11677$k06.2300@kovat.provo.novell.com...
>I will  print to the screen prior to the API call and after.  My 
>application can run from 3 day to 4 months without a problem then it just 
>locks up. Iput a lot of screen prints to find out what I am doing wrong. 
>The last output to the screen was "Before Call Thread".
>
> ScreenLogWrite("Before Call Thread");
> lResult = NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
> &lPBThread->myThreadId);
> ScreenLogWrite("After Call Thread");
>
> "Robert Charles Mahar" <info@trafficshaper.com> wrote in
message 
> news:6vU8j.9841$k06.4037@kovat.provo.novell.com...
>> This may be totally unhelpful, but I'm curious what 
>> lPBThread->myContext.ciState is just prior to the call.
>>
>> -- Bob
>>
>> - - - - - - - - - - - - - - - - -
>>       Robert Charles Mahar
>> Traffic Shaping Engine for NetWare
>>    http://www.TrafficShaper.com
>> - - - - - - - - - - - - - - - - -
>>
>>
>> Bob Piskac wrote:
>>> I think I found a bug with my code.  I was calling NXThreadCreate
with 
>>> an active thread.  The call would not return from NXThreadCreate. 
Since 
>>> this is a guess on my part, does anyone know what would happen if I
were 
>>> to call NXThreadCreate with a context that was running on an active

>>> thread?
>>>
>>> NXThreadCreate(lPBThread->myContext, NX_THR_DETACHED, 
>>> &lPBThread->myThreadId);
>>>
> 

Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact