From: hanslad@gmail.com
Subject: pragma Thread_Local_Storage on record?
Date: Tue, 1 Mar 2016 05:45:18 -0800 (PST)
Date: 2016-03-01T05:45:18-08:00 [thread overview]
Message-ID: <c4f4f07c-679b-4bda-a4f5-8ee689742b3e@googlegroups.com> (raw)
Hello,
I am trying to use the pragma Thread_Local_Storage on a record as follows:
In specification file:
...
package Local_Buffers is new Buffers(Any_Worker);
package Local_Mailboxes is new Local_Buffers.Mailboxes;
use Local_Buffers;
use Local_Mailboxes;
type Core is record
Wait_Queue : Any_Buffer;
Core_No : UInt32;
Current : WorkerId ;
Parent : WorkerId ;
Msgs : UInt64;
end record;
...
and body file goes like this:
...
Curr_Core : Core;
pragma Volatile(Curr_Core);
pragma Thread_Local_Storage( Curr_Core);
...
I get the following errors:
cores.adb:27:04: Thread_Local_Storage variable "Curr_Core" is improperly initialized
cores.adb:27:04: only allowed initialization is explicit "null" or static expression
What am I doing wrong here?
If the code snippets I provided is not sufficient for to see the real problem, please give me a hint and I will provide more code.
Thanks!
HP
next reply other threads:[~2016-03-01 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 13:45 hanslad [this message]
2016-03-01 14:44 ` pragma Thread_Local_Storage on record? Florian Weimer
2016-03-01 15:22 ` hanslad
2016-03-01 15:55 ` Dmitry A. Kazakov
2016-03-01 16:31 ` hanslad
2016-03-01 17:03 ` Dmitry A. Kazakov
2016-03-01 15:52 ` J-P. Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox