Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OTEnterNotifier



> My understanding of OTEnterNotifier/OTLeaveNotifier is that it is
> essentially a critical section that implicitly brackets code
> within an OT
> Notifier callback, along with any code you explicitly bracket with it
> elsewhere.  Is that correct?
>
> So, a call to OTEnterNotifier will not return until:
> a) any running OT Notifier callback has completed AND
> b) any previous call to OTEnterNotifier has been bracketed with an
> OTLeaveNotifier

To answer my own question, b) seems incorrect.  The old Inside Mac,
Networking with Open Transport, indicates that OTEnterNotifier will return
false if a call to it has already been made.  On the other hand, the old
docs make no mention of OTEnterNotifier blocking if a notification is
already in progress, presumably because this could not arise in the old "run
to completion" model.

I'm just looking for a quick fix for some old code.  If OTEnterNotifier
works like an ordinary critical section in current versions of OSX, that is
good enough for me.  I will update to use proper threading and BSD sockets
later.  I need to synchronize across system task, deferred task, Time
Manager, and OT notifier.  If OTEnterNotifier won't do it, it looks like
MPEnterCriticalSection would be best way to prevent, e.g., system task from
pre-empting deferred task in old-style code?

Thanks for any advice.  I know I'm a bit behind the curve here.

Tim

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

References: 
 >OTEnterNotifier (From: "Tim Dorcey" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.