[hackers] [scc] Fix some errors in README || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 13 Dec 2016 18:54:06 +0100 (CET)

commit 0825b37476468ac55cc493b0645fed0f37dbc756
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Dec 11 12:49:20 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Dec 13 18:53:40 2016 +0100

    Fix some errors in README
    
    There a few problems in README about volatile and const. They are fixed
    now although we should change the text to show that we want to implement
    volatile in the future.

diff --git a/README b/README
index 5012be1..35ad80c 100644
--- a/README
+++ b/README
_AT_@ -10,8 +10,8 @@ it will have some differences:
 Type qualifers make the type system ugly, and their uselessness add
 unnecessary complexity to the compiler (and increased compilation time):
         - const: The definition of const is not clear in the standard.
- If a const value is modified the behaviour is implementation
- defined. It seems it was defined in order to be able to
+ If a const value is modified the behaviour is undefined
+ behaviour. It seems it was defined in order to be able to
           allocate variables in ROM rather than error detection. This
           implememtation will not warn about these modifications and
           the compiler will treat them like normal variables (the standard
_AT_@ -22,13 +22,13 @@ unnecessary complexity to the compiler (and increased compilation time):
           volatile have undefined state) and for memory mapped registers
           or variables whose values are modified asynchronously. This can
           be achieved with special pragma values though.
- In the first case, this is non-portable code by definition
+ In the first case, it generates a lot of problems with modern
+ processors and multithreading, where not holding the value in a
+ register is not good enough (an explicit memory barrier is needed).
+ In the second case, this is non-portable code by definition
           (depending on the register mapped), so it is better to deal with
           it using another solution (compiler extensions or direct
           assembler).
- In the second case, it generates a lot of problems with modern
- processors and multithreading, where not holding the value in a
- register is not good enough (an explicit memory barrier is needed).
 
         - restrict: This qualifer can only be applied to pointers to
           mark that the pointed object has no other alias. This qualifer
Received on Tue Dec 13 2016 - 18:54:06 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 13 2016 - 19:00:16 CET