Welcome! Log In Create A New Profile

Advanced

[njs] Removing the requirement of "aligned" attribute support.

Dmitry Volyntsev
May 31, 2021 03:24AM
details: https://hg.nginx.org/njs/rev/7d835eb234e1
branches:
changeset: 1646:7d835eb234e1
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Mon May 31 06:55:32 2021 +0000
description:
Removing the requirement of "aligned" attribute support.

Before 0a2a0b5a74f4, the address of values used in runtime had to be the
multiple of 16, because the address of a variable was used as its VM
index. The first 4 bits of an index signified the scope of a varible.

This is no longer the case, after 0a2a0b5a74f4 the address of a variable
is never used as its VM index.

diffstat:

src/njs_value.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diffs (14 lines):

diff -r fc510b2e4f3a -r 7d835eb234e1 src/njs_value.h
--- a/src/njs_value.h Fri May 28 15:23:03 2021 +0000
+++ b/src/njs_value.h Mon May 31 06:55:32 2021 +0000
@@ -105,10 +105,6 @@ typedef struct njs_property_next_s nj
typedef struct njs_object_init_s njs_object_init_t;


-#if (!NJS_HAVE_GCC_ATTRIBUTE_ALIGNED)
-#error "aligned attribute is required"
-#endif
-
union njs_value_s {
/*
* The njs_value_t size is 16 bytes and must be aligned to 16 bytes
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Removing the requirement of "aligned" attribute support.

Dmitry Volyntsev 251 May 31, 2021 03:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 290
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready