Copy keys of threads compatibility routines for libgcc2?

Sebastian Huber sebastian.huber@embedded-brains.de
Tue Jun 30 09:24:00 GMT 2015


Hello,

the file libgcc/gthr.h defines the interface for the thread support used 
by libgcc2 and C11. A couple of types are required, e.g.

      __gthread_key_t

Is it allowed to copy objects of this type?  For example is the 
following a valid use case

     __gthread_key_t k1;
     __gthread_key_t k2;

     __gthread_key_create(&k1);
     k2 = k1;
     __gthread_setspecific(k2, 0xdeadbeef);
     __gthread_key_delete(k2);

?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Gcc mailing list