[Info-vax] yet another sys$qiow question
John Reagan
xyzzy1959 at gmail.com
Thu Aug 20 10:31:04 EDT 2015
On Wednesday, August 19, 2015 at 8:22:47 PM UTC-4, Stephen Hoffman wrote:
> On 2015-08-19 23:45:21 +0000, John Reagan said:
>
> > On Wednesday, August 19, 2015 at 7:37:14 PM UTC-4, David Froble wrote:
> >>
> >> In this case, I'm going to observe that it's poor coding practice. Why
> >> would you tie up the CPU in a loop? Wouldn't that have an adverse
> >> affect on all users?
> >
> > You wouldn't do this in practice. You'd use $WAITFR and $SYNCH.
>
> Or an AST, of course. Or multithreading in C11, or some other
> language environment that supports such. Maybe Rust, on x86-64,
> if/when VMS gets there.
>
C11's multithreading biggest addition is providing thread local storage (TLS). Today if you want such a think, you have to get some unique thread ID and then index into some global structure of pointers, etc. Real TLS uses relocations defined in the ABI that use the contents of the thread control block (TCB). On Itanium, I think that is register 13. Then the compiler still has to worry about atomic access of those TLS variables between threads.
More information about the Info-vax
mailing list