diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-27 18:41:59 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-27 18:41:59 +0000 |
commit | 574f2f43948bb21d6e4187936ba5a5afccba25f6 (patch) | |
tree | 0b39aca564149e5ad30b3cc791228655ff1b1827 /util-linux | |
parent | fe66a0eca1bfeae0abc0fc1e7d3709f271e05e82 (diff) |
*: add optimization barrier to all "G trick" locations
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdisk.c | 2 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 2 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 2 | ||||
-rw-r--r-- | util-linux/more.c | 2 | ||||
-rw-r--r-- | util-linux/script.c | 2 |
5 files changed, 4 insertions, 6 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index c98a74fc0..827ea21f3 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -309,7 +309,7 @@ struct globals { #define MBRbuffer (G.MBRbuffer) #define ptes (G.ptes) #define INIT_G() do { \ - PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ + SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ sector_size = DEFAULT_SECTOR_SIZE; \ sector_offset = 1; \ g_partitions = 4; \ diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index deb82f75b..62e4f08b6 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -190,7 +190,7 @@ struct globals { #define check_file_blk (G.check_file_blk ) #define current_name (G.current_name ) #define INIT_G() do { \ - PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ + SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ dirsize = 16; \ namelen = 14; \ current_name[0] = '/'; \ diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 118b95efb..a784b72f4 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -122,7 +122,7 @@ struct globals { }; #define G (*ptr_to_globals) #define INIT_G() do { \ - PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ + SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ } while (0) static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n) diff --git a/util-linux/more.c b/util-linux/more.c index eeeea509e..2d5535991 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -28,9 +28,7 @@ struct globals { struct termios new_settings; }; #define G (*(struct globals*)bb_common_bufsiz1) -//#define G (*ptr_to_globals) #define INIT_G() ((void)0) -//#define INIT_G() PTR_TO_GLOBALS = xzalloc(sizeof(G)) #define initial_settings (G.initial_settings) #define new_settings (G.new_settings ) #define cin_fileno (G.cin_fileno ) diff --git a/util-linux/script.c b/util-linux/script.c index fda726ed9..e6dbb1aa2 100644 --- a/util-linux/script.c +++ b/util-linux/script.c @@ -25,7 +25,7 @@ struct globals { #define tt (G.tt ) #define fname (G.fname ) #define INIT_G() do { \ - PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ + SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ fname = "typescript"; \ } while (0) |