Dare I ... another volatile discussion ?

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Sun May 10 05:43:29 PDT 2015


On Saturday, 9 May 2015 at 16:59:35 UTC, Jens Bauer wrote:
> ... "System calls" will need to access the peripherals in some 
> way, in order to send data to for instance a printer or 
> harddisk. If the way it's done is using a memory location, then 
> it's necessary to tell the compiler that this is not ordinary 
> memory, but I/O-memory AKA hardware address space.

Userland code still uses system calls and not global variables, 
whatever is expressed in read(2) signature tells the compiler 
enough to pass data via buffer.

>> Shared is supposed to prevent the programmer from accidentally 
>> putting unshared data in a shared context. Expectedly people 
>> wanted it to be a silver bullet for concurrency, instead 
>> std.concurrency provides high-level concurrency safety.
>
> In other words, it's the oposite of 'static' ?

Whether data is shared or not is not tied to its storage class, 
that's why its shared nature is expressed in its type and storage 
class can be anything; for the same reason shared type qualifier 
is transitive.


More information about the Digitalmars-d mailing list