Application hangs issue in QNX6

Hi all,

I have an application with 3 threads which updates the GUI in parallel. In some cases, 3 threads will try to update the GUI at the same time.
Before each GUI update, PtEnter() and PtLeave() is used. Is there any possiblity of application hang in such a situation ? Please help.

PtEnter()/PtLeave() code snippet used

int flags = PtEnter(0);
if ((flags >= 0) || (flags == -EDEADLK))
{
some GUI updates
if (flags >= 0)
{
PtLeave(flags);
}
}

Regards,
hello