Threading issue
"Des Smith" <[email protected]> Wed, 18 Dec 2002 08:45:58 -0000
| Newsgroups | gmane.network.beep.beepcore.c.general |
|---|---|
| Message-ID | <000001c2a671$e33dab20$b80112ac@DESSMITH> |
I find that intermittently the fiostate_unblock_write() is hanging as
something is holding onto the
ios->pn->lock.
Im using gdb and looking at the process threads. Looking at the code I
noticed that in the file
bp_fcbeeptcp.c in the notify_Lower routine I see the following lines
Notify_lower()
{
..
..
..
.
case 3:
SEM_POST(&thisio->lock);
if (thisio->state >= IOS_STATE_ACTIVE)
thisio->state=IOS_STATE_WRITE_PENDING;
SEM_POST(&thisio->lock);
fiostate_unblock_write(thisio);
break;
default:
}
To me this doesnt look right. Ie it looks like you should have
SEM_WAIT(&thisio->lock) after the case statement.
Using gdb by printing the ios-pn->lock variable ie see a count of 17.
Could this be causing the hanging?
Has only else seen this behaviour?
Thanks for your help
Des Smith.