T.R | Title | User | Personal Name | Date | Lines |
---|
2540.1 | Use threads | TOOK::BURGESS | | Thu Mar 12 1992 14:19 | 17 |
| No, there are no time-outs associated with the lock rtns.
I recommend creating a tmo thread to
delay (t)
if not alerted, then send-alert to parent thread
return
parent thread
create tmo thread
lock_acquire
if stat neq alert, then send-alert to tmo-thread
...
Note that lock identifiers belong to the creating thread and
can only be used by that creating thread.
\Pete
|
2540.2 | Thanks for the response, Pete! | TAEC::SILVA | Carl Silva, TBG Eng, SAT-0/C-H6, DTN:828-5339 | Fri Mar 13 1992 04:30 | 27 |
| RE: .1,
> No, there are no time-outs associated with the lock rtns.
OK. Do these routines use the cma_mutex or cma_cond functions
internally?
> I recommend creating a tmo thread to
> delay (t)
> if not alerted, then send-alert to parent thread
> return
>
> parent thread
> create tmo thread
> lock_acquire
> if stat neq alert, then send-alert to tmo-thread
> ...
>
>Note that lock identifiers belong to the creating thread and
>can only be used by that creating thread.
You wouldn't happen to have a little example code that does this, would
you?
Wouldn't it be just as easy to have the mcc_lock routines do this?
Carl
|
2540.3 | Check out the Example FM Library source code | NANOVX::ROBERTS | Keith Roberts - DECmcc Toolkit Team | Fri Mar 13 1992 10:58 | 20 |
| RE: .2
> You wouldn't happen to have a little example code that does this, would you?
Carl,
There is a time-out routine in the Example FM Library. You got this
source code when you installed the DECmcc Toolkit. The files are in:
VMS: mcc_examples:mcc_example_fm_library.c
ULTRIX: /usr/mcc/mmtoolkit/examples/mcc_example_fm_library.c
The routine name is: exlib_timed_operation
> Wouldn't it be just as easy to have the mcc_lock routines do this?
I would think so, but ... what do I know.
/keith
|
2540.4 | suggestion noted | TOOK::BURGESS | | Fri Mar 13 1992 15:25 | 1 |
| Thank you for the suggestion, Carl.
|
2540.5 | Thanks! | TAEC::SILVA | Carl Silva, TBG Eng, SAT-0/C-H6, DTN:828-5339 | Mon Mar 16 1992 05:13 | 7 |
| RE: .3,
Thanks for the pointer. I'll check it out.
RE: .4,
Well, it was just an idea. 8-)
|