]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: remove obsolete support for -mregparm / USE_REGPARM
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 06:38:05 +0000 (07:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 06:41:47 +0000 (07:41 +0100)
This used to be a minor optimization on ix86 where registers are scarce
and the calling convention not very efficient, but this platform is not
relevant enough anymore to warrant all this dirt in the code for the sake
of saving 1 or 2% of performance. Modern platforms don't use this at all
since their calling convention already defaults to using several registers
so better get rid of this once for all.

27 files changed:
Makefile
ebtree/eb32sctree.c
ebtree/eb32sctree.h
ebtree/eb32tree.c
ebtree/eb32tree.h
ebtree/eb64tree.c
ebtree/eb64tree.h
ebtree/ebimtree.c
ebtree/ebimtree.h
ebtree/ebistree.c
ebtree/ebistree.h
ebtree/ebmbtree.c
ebtree/ebmbtree.h
ebtree/ebpttree.c
ebtree/ebsttree.c
ebtree/ebsttree.h
ebtree/ebtree.c
ebtree/ebtree.h
include/common/compiler.h
include/common/time.h
include/types/fd.h
src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/time.c

index 042a6165a0d33265c69674f8dcbd6e7d37411611..8f8119a14c427f50d20586edf7ca214119120d43 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,6 @@
 #   USE_PRIVATE_CACHE    : disable shared memory cache of ssl sessions.
 #   USE_THREAD           : enable threads support.
 #   USE_PTHREAD_PSHARED  : enable pthread process shared mutex on sslcache.
-#   USE_REGPARM          : enable regparm optimization. Recommended on x86.
 #   USE_STATIC_PCRE      : enable static libpcre. Recommended.
 #   USE_STATIC_PCRE2     : enable static libpcre2.
 #   USE_TPROXY           : enable transparent proxy. Automatic.
@@ -288,7 +287,7 @@ LDFLAGS = $(ARCH_FLAGS) -g
 # the reported build options.
 use_opts = USE_EPOLL USE_KQUEUE USE_MY_EPOLL USE_MY_SPLICE USE_NETFILTER      \
            USE_PCRE USE_PCRE_JIT USE_PCRE2 USE_PCRE2_JIT USE_POLL             \
-           USE_PRIVATE_CACHE USE_THREAD USE_PTHREAD_PSHARED USE_REGPARM       \
+           USE_PRIVATE_CACHE USE_THREAD USE_PTHREAD_PSHARED                   \
            USE_STATIC_PCRE USE_STATIC_PCRE2 USE_TPROXY USE_LINUX_TPROXY       \
            USE_LINUX_SPLICE USE_LIBCRYPT USE_CRYPT_H USE_VSYSCALL             \
            USE_GETADDRINFO USE_OPENSSL USE_LUA USE_FUTEX USE_ACCEPT4          \
@@ -505,10 +504,6 @@ ifneq ($(USE_VSYSCALL),)
 OPTIONS_OBJS   += src/i386-linux-vsys.o
 endif
 
-ifneq ($(USE_REGPARM),)
-OPTIONS_CFLAGS += -DCONFIG_REGPARM=3
-endif
-
 ifneq ($(USE_DL),)
 OPTIONS_LDFLAGS += -ldl
 endif
index e7034343504158088bf84002bda1febbf98da15d..14e59801809c65acb6abdb9ab7310d05307cdcc5 100644 (file)
@@ -26,7 +26,7 @@
 /* This function is used to build a tree of duplicates by adding a new node to
  * a subtree of at least 2 entries.
  */
-REGPRM1 struct eb32sc_node *eb32sc_insert_dup(struct eb_node *sub, struct eb_node *new, unsigned long scope)
+struct eb32sc_node *eb32sc_insert_dup(struct eb_node *sub, struct eb_node *new, unsigned long scope)
 {
        struct eb32sc_node *eb32;
        struct eb_node *head = sub;
@@ -104,7 +104,7 @@ REGPRM1 struct eb32sc_node *eb32sc_insert_dup(struct eb_node *sub, struct eb_nod
  * new->key needs be set with the key. The eb32sc_node is returned. This
  * implementation does NOT support unique trees.
  */
-REGPRM2 struct eb32sc_node *eb32sc_insert(struct eb_root *root, struct eb32sc_node *new, unsigned long scope)
+struct eb32sc_node *eb32sc_insert(struct eb_root *root, struct eb32sc_node *new, unsigned long scope)
 {
        struct eb32sc_node *old;
        unsigned int side;
@@ -236,7 +236,7 @@ REGPRM2 struct eb32sc_node *eb32sc_insert(struct eb_root *root, struct eb32sc_no
  * Find the first occurrence of the lowest key in the tree <root>, which is
  * equal to or greater than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct eb32sc_node *eb32sc_lookup_ge(struct eb_root *root, u32 x, unsigned long scope)
+struct eb32sc_node *eb32sc_lookup_ge(struct eb_root *root, u32 x, unsigned long scope)
 {
        struct eb32sc_node *node;
        eb_troot_t *troot;
@@ -304,7 +304,7 @@ REGPRM2 struct eb32sc_node *eb32sc_lookup_ge(struct eb_root *root, u32 x, unsign
  * equal to or greater than <x>, matching scope <scope>. If not found, it loops
  * back to the beginning of the tree. NULL is returned is no key matches.
  */
-REGPRM2 struct eb32sc_node *eb32sc_lookup_ge_or_first(struct eb_root *root, u32 x, unsigned long scope)
+struct eb32sc_node *eb32sc_lookup_ge_or_first(struct eb_root *root, u32 x, unsigned long scope)
 {
        struct eb32sc_node *eb32;
        eb_troot_t *troot;
index 51a2664edeb17d94cb25c60b3e785a5f817d1569..f547ff039c8ae40e13992d71b414c7f58d1285cb 100644 (file)
@@ -56,9 +56,9 @@ struct eb32sc_node {
  * The following functions are not inlined by default. They are declared
  * in eb32sctree.c, which simply relies on their inline version.
  */
-REGPRM2 struct eb32sc_node *eb32sc_lookup_ge(struct eb_root *root, u32 x, unsigned long scope);
-REGPRM2 struct eb32sc_node *eb32sc_lookup_ge_or_first(struct eb_root *root, u32 x, unsigned long scope);
-REGPRM2 struct eb32sc_node *eb32sc_insert(struct eb_root *root, struct eb32sc_node *new, unsigned long scope);
+struct eb32sc_node *eb32sc_lookup_ge(struct eb_root *root, u32 x, unsigned long scope);
+struct eb32sc_node *eb32sc_lookup_ge_or_first(struct eb_root *root, u32 x, unsigned long scope);
+struct eb32sc_node *eb32sc_insert(struct eb_root *root, struct eb32sc_node *new, unsigned long scope);
 void eb32sc_delete(struct eb32sc_node *node);
 
 /* Walks down left starting at root pointer <start>, and follow the leftmost
index 5ae33407a8caf51192cdcc955232f215a3a424d1..77e4793f1e75f2a41dc27dc422d7a461b274b88f 100644 (file)
 
 #include "eb32tree.h"
 
-REGPRM2 struct eb32_node *eb32_insert(struct eb_root *root, struct eb32_node *new)
+struct eb32_node *eb32_insert(struct eb_root *root, struct eb32_node *new)
 {
        return __eb32_insert(root, new);
 }
 
-REGPRM2 struct eb32_node *eb32i_insert(struct eb_root *root, struct eb32_node *new)
+struct eb32_node *eb32i_insert(struct eb_root *root, struct eb32_node *new)
 {
        return __eb32i_insert(root, new);
 }
 
-REGPRM2 struct eb32_node *eb32_lookup(struct eb_root *root, u32 x)
+struct eb32_node *eb32_lookup(struct eb_root *root, u32 x)
 {
        return __eb32_lookup(root, x);
 }
 
-REGPRM2 struct eb32_node *eb32i_lookup(struct eb_root *root, s32 x)
+struct eb32_node *eb32i_lookup(struct eb_root *root, s32 x)
 {
        return __eb32i_lookup(root, x);
 }
@@ -46,7 +46,7 @@ REGPRM2 struct eb32_node *eb32i_lookup(struct eb_root *root, s32 x)
  * Find the last occurrence of the highest key in the tree <root>, which is
  * equal to or less than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct eb32_node *eb32_lookup_le(struct eb_root *root, u32 x)
+struct eb32_node *eb32_lookup_le(struct eb_root *root, u32 x)
 {
        struct eb32_node *node;
        eb_troot_t *troot;
@@ -134,7 +134,7 @@ REGPRM2 struct eb32_node *eb32_lookup_le(struct eb_root *root, u32 x)
  * Find the first occurrence of the lowest key in the tree <root>, which is
  * equal to or greater than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct eb32_node *eb32_lookup_ge(struct eb_root *root, u32 x)
+struct eb32_node *eb32_lookup_ge(struct eb_root *root, u32 x)
 {
        struct eb32_node *node;
        eb_troot_t *troot;
index 08ff90064f9107d7354f87ef25db1a516f2d468c..8c1a47025cc43e476dc2d3194e14fadf024668db 100644 (file)
@@ -110,12 +110,12 @@ static inline void eb32_delete(struct eb32_node *eb32)
  * The following functions are not inlined by default. They are declared
  * in eb32tree.c, which simply relies on their inline version.
  */
-REGPRM2 struct eb32_node *eb32_lookup(struct eb_root *root, u32 x);
-REGPRM2 struct eb32_node *eb32i_lookup(struct eb_root *root, s32 x);
-REGPRM2 struct eb32_node *eb32_lookup_le(struct eb_root *root, u32 x);
-REGPRM2 struct eb32_node *eb32_lookup_ge(struct eb_root *root, u32 x);
-REGPRM2 struct eb32_node *eb32_insert(struct eb_root *root, struct eb32_node *new);
-REGPRM2 struct eb32_node *eb32i_insert(struct eb_root *root, struct eb32_node *new);
+struct eb32_node *eb32_lookup(struct eb_root *root, u32 x);
+struct eb32_node *eb32i_lookup(struct eb_root *root, s32 x);
+struct eb32_node *eb32_lookup_le(struct eb_root *root, u32 x);
+struct eb32_node *eb32_lookup_ge(struct eb_root *root, u32 x);
+struct eb32_node *eb32_insert(struct eb_root *root, struct eb32_node *new);
+struct eb32_node *eb32i_insert(struct eb_root *root, struct eb32_node *new);
 
 /*
  * The following functions are less likely to be used directly, because their
index 7ce3f41576781265f89d000a1b017ee15ff0d11e..442e973a8ef8fdda72661a34f8617ef27d7bb435 100644 (file)
 
 #include "eb64tree.h"
 
-REGPRM2 struct eb64_node *eb64_insert(struct eb_root *root, struct eb64_node *new)
+struct eb64_node *eb64_insert(struct eb_root *root, struct eb64_node *new)
 {
        return __eb64_insert(root, new);
 }
 
-REGPRM2 struct eb64_node *eb64i_insert(struct eb_root *root, struct eb64_node *new)
+struct eb64_node *eb64i_insert(struct eb_root *root, struct eb64_node *new)
 {
        return __eb64i_insert(root, new);
 }
 
-REGPRM2 struct eb64_node *eb64_lookup(struct eb_root *root, u64 x)
+struct eb64_node *eb64_lookup(struct eb_root *root, u64 x)
 {
        return __eb64_lookup(root, x);
 }
 
-REGPRM2 struct eb64_node *eb64i_lookup(struct eb_root *root, s64 x)
+struct eb64_node *eb64i_lookup(struct eb_root *root, s64 x)
 {
        return __eb64i_lookup(root, x);
 }
@@ -46,7 +46,7 @@ REGPRM2 struct eb64_node *eb64i_lookup(struct eb_root *root, s64 x)
  * Find the last occurrence of the highest key in the tree <root>, which is
  * equal to or less than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct eb64_node *eb64_lookup_le(struct eb_root *root, u64 x)
+struct eb64_node *eb64_lookup_le(struct eb_root *root, u64 x)
 {
        struct eb64_node *node;
        eb_troot_t *troot;
@@ -134,7 +134,7 @@ REGPRM2 struct eb64_node *eb64_lookup_le(struct eb_root *root, u64 x)
  * Find the first occurrence of the lowest key in the tree <root>, which is
  * equal to or greater than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct eb64_node *eb64_lookup_ge(struct eb_root *root, u64 x)
+struct eb64_node *eb64_lookup_ge(struct eb_root *root, u64 x)
 {
        struct eb64_node *node;
        eb_troot_t *troot;
index 6d0d03910e0c8c8530cf1d1f06b3917c39c82ef7..9c8feebd319627ed0b3f838664dade27349067fb 100644 (file)
@@ -110,12 +110,12 @@ static inline void eb64_delete(struct eb64_node *eb64)
  * The following functions are not inlined by default. They are declared
  * in eb64tree.c, which simply relies on their inline version.
  */
-REGPRM2 struct eb64_node *eb64_lookup(struct eb_root *root, u64 x);
-REGPRM2 struct eb64_node *eb64i_lookup(struct eb_root *root, s64 x);
-REGPRM2 struct eb64_node *eb64_lookup_le(struct eb_root *root, u64 x);
-REGPRM2 struct eb64_node *eb64_lookup_ge(struct eb_root *root, u64 x);
-REGPRM2 struct eb64_node *eb64_insert(struct eb_root *root, struct eb64_node *new);
-REGPRM2 struct eb64_node *eb64i_insert(struct eb_root *root, struct eb64_node *new);
+struct eb64_node *eb64_lookup(struct eb_root *root, u64 x);
+struct eb64_node *eb64i_lookup(struct eb_root *root, s64 x);
+struct eb64_node *eb64_lookup_le(struct eb_root *root, u64 x);
+struct eb64_node *eb64_lookup_ge(struct eb_root *root, u64 x);
+struct eb64_node *eb64_insert(struct eb_root *root, struct eb64_node *new);
+struct eb64_node *eb64i_insert(struct eb_root *root, struct eb64_node *new);
 
 /*
  * The following functions are less likely to be used directly, because their
index 8a75cd840062a5ab357fa09d186eef36c2e2a7fe..3e6a7ce267ab934a136fa75546ed99f2cc58ad75 100644 (file)
@@ -26,7 +26,7 @@
 /* Find the first occurrence of a key of <len> bytes in the tree <root>.
  * If none can be found, return NULL.
  */
-REGPRM3 struct ebpt_node *
+struct ebpt_node *
 ebim_lookup(struct eb_root *root, const void *x, unsigned int len)
 {
        return __ebim_lookup(root, x, len);
@@ -37,7 +37,7 @@ ebim_lookup(struct eb_root *root, const void *x, unsigned int len)
  * If root->b[EB_RGHT]==1, the tree may only contain unique keys. The
  * len is specified in bytes.
  */
-REGPRM3 struct ebpt_node *
+struct ebpt_node *
 ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len)
 {
        return __ebim_insert(root, new, len);
index 4a98c96a346aa30d5be0b4aed80f7171367b57c2..8b12a548d43ca55f9dc5cc0bee2e36dab086f21e 100644 (file)
@@ -32,8 +32,8 @@
 /* The following functions are not inlined by default. They are declared
  * in ebimtree.c, which simply relies on their inline version.
  */
-REGPRM3 struct ebpt_node *ebim_lookup(struct eb_root *root, const void *x, unsigned int len);
-REGPRM3 struct ebpt_node *ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len);
+struct ebpt_node *ebim_lookup(struct eb_root *root, const void *x, unsigned int len);
+struct ebpt_node *ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len);
 
 /* Find the first occurrence of a key of a least <len> bytes matching <x> in the
  * tree <root>. The caller is responsible for ensuring that <len> will not exceed
index d3dc0c5e69aa274ec426802c7007edfcea2c4c25..098ccfb43c5c16e5a253355145a066947c6ef60d 100644 (file)
@@ -26,7 +26,7 @@
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
-REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x)
+struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x)
 {
        return __ebis_lookup(root, x);
 }
@@ -36,7 +36,7 @@ REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x)
  * returned. If root->b[EB_RGHT]==1, the tree may only contain unique keys. The
  * caller is responsible for properly terminating the key with a zero.
  */
-REGPRM2 struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new)
+struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new)
 {
        return __ebis_insert(root, new);
 }
index 9c4fd8cbacd9f7b604db83af0e3cd8a69d7616de..0c995483f4cb81291e0fd2daca75bb727507e3fb 100644 (file)
@@ -35,8 +35,8 @@
 /* The following functions are not inlined by default. They are declared
  * in ebistree.c, which simply relies on their inline version.
  */
-REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
-REGPRM2 struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new);
+struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
+struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new);
 
 /* Find the first occurrence of a length <len> string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
index 5fbef208f126b7157705edac69cd61f93215f7a3..ceedefce38f4e36d108dec17a67d039a1150f42d 100644 (file)
@@ -25,7 +25,7 @@
 /* Find the first occurrence of a key of <len> bytes in the tree <root>.
  * If none can be found, return NULL.
  */
-REGPRM3 struct ebmb_node *
+struct ebmb_node *
 ebmb_lookup(struct eb_root *root, const void *x, unsigned int len)
 {
        return __ebmb_lookup(root, x, len);
@@ -36,7 +36,7 @@ ebmb_lookup(struct eb_root *root, const void *x, unsigned int len)
  * If root->b[EB_RGHT]==1, the tree may only contain unique keys. The
  * len is specified in bytes.
  */
-REGPRM3 struct ebmb_node *
+struct ebmb_node *
 ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
 {
        return __ebmb_insert(root, new, len);
@@ -46,7 +46,7 @@ ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
  * tree <root>. It's the caller's responsibility to ensure that key <x> is at
  * least as long as the keys in the tree. If none can be found, return NULL.
  */
-REGPRM2 struct ebmb_node *
+struct ebmb_node *
 ebmb_lookup_longest(struct eb_root *root, const void *x)
 {
        return __ebmb_lookup_longest(root, x);
@@ -55,7 +55,7 @@ ebmb_lookup_longest(struct eb_root *root, const void *x)
 /* Find the first occurrence of a prefix matching a key <x> of <pfx> BITS in the
  * tree <root>. If none can be found, return NULL.
  */
-REGPRM3 struct ebmb_node *
+struct ebmb_node *
 ebmb_lookup_prefix(struct eb_root *root, const void *x, unsigned int pfx)
 {
        return __ebmb_lookup_prefix(root, x, pfx);
@@ -70,7 +70,7 @@ ebmb_lookup_prefix(struct eb_root *root, const void *x, unsigned int pfx)
  * If root->b[EB_RGHT]==1, the tree may only contain unique keys. The
  * len is specified in bytes.
  */
-REGPRM3 struct ebmb_node *
+struct ebmb_node *
 ebmb_insert_prefix(struct eb_root *root, struct ebmb_node *new, unsigned int len)
 {
        return __ebmb_insert_prefix(root, new, len);
index 6ed7de4b84e392e340e9006c97dc3584764a6772..3200a126e09d27847a6c7ce6ef94a0279d047910 100644 (file)
@@ -107,11 +107,11 @@ static forceinline void ebmb_delete(struct ebmb_node *ebmb)
 /* The following functions are not inlined by default. They are declared
  * in ebmbtree.c, which simply relies on their inline version.
  */
-REGPRM3 struct ebmb_node *ebmb_lookup(struct eb_root *root, const void *x, unsigned int len);
-REGPRM3 struct ebmb_node *ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len);
-REGPRM2 struct ebmb_node *ebmb_lookup_longest(struct eb_root *root, const void *x);
-REGPRM3 struct ebmb_node *ebmb_lookup_prefix(struct eb_root *root, const void *x, unsigned int pfx);
-REGPRM3 struct ebmb_node *ebmb_insert_prefix(struct eb_root *root, struct ebmb_node *new, unsigned int len);
+struct ebmb_node *ebmb_lookup(struct eb_root *root, const void *x, unsigned int len);
+struct ebmb_node *ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len);
+struct ebmb_node *ebmb_lookup_longest(struct eb_root *root, const void *x);
+struct ebmb_node *ebmb_lookup_prefix(struct eb_root *root, const void *x, unsigned int pfx);
+struct ebmb_node *ebmb_insert_prefix(struct eb_root *root, struct ebmb_node *new, unsigned int len);
 
 /* The following functions are less likely to be used directly, because their
  * code is larger. The non-inlined version is preferred.
index 1960f3132b8077b3eef21a2e0649ed13885f207b..a7e6b06f54ec6be29982aa3d9a437222b38482c8 100644 (file)
 
 #include "ebpttree.h"
 
-REGPRM2 struct ebpt_node *ebpt_insert(struct eb_root *root, struct ebpt_node *new)
+struct ebpt_node *ebpt_insert(struct eb_root *root, struct ebpt_node *new)
 {
        return __ebpt_insert(root, new);
 }
 
-REGPRM2 struct ebpt_node *ebpt_lookup(struct eb_root *root, void *x)
+struct ebpt_node *ebpt_lookup(struct eb_root *root, void *x)
 {
        return __ebpt_lookup(root, x);
 }
@@ -36,7 +36,7 @@ REGPRM2 struct ebpt_node *ebpt_lookup(struct eb_root *root, void *x)
  * Find the last occurrence of the highest key in the tree <root>, which is
  * equal to or less than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct ebpt_node *ebpt_lookup_le(struct eb_root *root, void *x)
+struct ebpt_node *ebpt_lookup_le(struct eb_root *root, void *x)
 {
        struct ebpt_node *node;
        eb_troot_t *troot;
@@ -124,7 +124,7 @@ REGPRM2 struct ebpt_node *ebpt_lookup_le(struct eb_root *root, void *x)
  * Find the first occurrence of the lowest key in the tree <root>, which is
  * equal to or greater than <x>. NULL is returned is no key matches.
  */
-REGPRM2 struct ebpt_node *ebpt_lookup_ge(struct eb_root *root, void *x)
+struct ebpt_node *ebpt_lookup_ge(struct eb_root *root, void *x)
 {
        struct ebpt_node *node;
        eb_troot_t *troot;
index 88b8139c892affd0fd0d80998548f259e8e46f6d..e44796ca6012ebebe5e4743074655c342fa05d45 100644 (file)
@@ -26,7 +26,7 @@
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
-REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x)
+struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x)
 {
        return __ebst_lookup(root, x);
 }
@@ -36,7 +36,7 @@ REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x)
  * returned. If root->b[EB_RGHT]==1, the tree may only contain unique keys. The
  * caller is responsible for properly terminating the key with a zero.
  */
-REGPRM2 struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new)
+struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new)
 {
        return __ebst_insert(root, new);
 }
index cd6994c66af0349b54e21d7c97f48d211641b7bd..d1949c788d6ddbd9cd192726591735c953b374b4 100644 (file)
@@ -29,8 +29,8 @@
 /* The following functions are not inlined by default. They are declared
  * in ebsttree.c, which simply relies on their inline version.
  */
-REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
-REGPRM2 struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new);
+struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
+struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new);
 
 /* Find the first occurrence of a length <len> string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
index fb266ec979d838bdb4b74effe1dd31f2be564ff6..d60c799574d405b98f3dae8c32ac48f87c1fdbd8 100644 (file)
@@ -26,7 +26,7 @@ void eb_delete(struct eb_node *node)
 }
 
 /* used by insertion primitives */
-REGPRM1 struct eb_node *eb_insert_dup(struct eb_node *sub, struct eb_node *new)
+struct eb_node *eb_insert_dup(struct eb_node *sub, struct eb_node *new)
 {
        return __eb_insert_dup(sub, new);
 }
index 6ac79d610854c1f245cf9b37c25c7c2c409e441d..e87e961c3301197741c1b2c7f2879328920a1813 100644 (file)
@@ -911,7 +911,7 @@ static forceinline int get_bit(const unsigned char *a, unsigned int pos)
 
 /* These functions are declared in ebtree.c */
 void eb_delete(struct eb_node *node);
-REGPRM1 struct eb_node *eb_insert_dup(struct eb_node *sub, struct eb_node *new);
+struct eb_node *eb_insert_dup(struct eb_node *sub, struct eb_node *new);
 
 #endif /* _EB_TREE_H */
 
index 377b54da684036752193c0cf654be5d74e384ba2..c5cd9cc3ae5d112841760daa614a97a94d9dcadd 100644 (file)
 #endif
 
 
-/* Support passing function parameters in registers. For this, the
- * CONFIG_REGPARM macro has to be set to the maximal number of registers
- * allowed. Some functions have intentionally received a regparm lower than
- * their parameter count, it is in order to avoid register clobbering where
- * they are called.
- */
-#ifndef REGPRM1
-#if CONFIG_REGPARM >= 1 && __GNUC__ >= 3
-#define REGPRM1        __attribute__((regparm(1)))
-#else
-#define REGPRM1
-#endif
-#endif
-
-#ifndef REGPRM2
-#if CONFIG_REGPARM >= 2 && __GNUC__ >= 3
-#define REGPRM2        __attribute__((regparm(2)))
-#else
-#define REGPRM2 REGPRM1
-#endif
-#endif
-
-#ifndef REGPRM3
-#if CONFIG_REGPARM >= 3 && __GNUC__ >= 3
-#define REGPRM3        __attribute__((regparm(3)))
-#else
-#define REGPRM3 REGPRM2
-#endif
-#endif
-
-
 /* By default, gcc does not inline large chunks of code, but we want it to
  * respect our choices.
  */
index d6bbecb8e1c06f151e7f0ae7c0273303576e7fbe..e59ed5e6e9c3317b0d2c09c8bde5b9ebb077588c 100644 (file)
@@ -69,25 +69,25 @@ extern THREAD_LOCAL struct timeval after_poll;       /* system date after leavin
 /*
  * adds <ms> ms to <from>, set the result to <tv> and returns a pointer <tv>
  */
-REGPRM3 struct timeval *tv_ms_add(struct timeval *tv, const struct timeval *from, int ms);
+struct timeval *tv_ms_add(struct timeval *tv, const struct timeval *from, int ms);
 
 /*
  * compares <tv1> and <tv2> modulo 1ms: returns 0 if equal, -1 if tv1 < tv2, 1 if tv1 > tv2
  * Must not be used when either argument is eternity. Use tv_ms_cmp2() for that.
  */
-REGPRM2 int tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2);
+int tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2);
 
 /*
  * compares <tv1> and <tv2> modulo 1 ms: returns 0 if equal, -1 if tv1 < tv2, 1 if tv1 > tv2,
  * assuming that TV_ETERNITY is greater than everything.
  */
-REGPRM2 int tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2);
+int tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2);
 
 /**** general purpose functions and macros *******************************/
 
 
 /* tv_now: sets <tv> to the current time */
-REGPRM1 static inline struct timeval *tv_now(struct timeval *tv)
+static inline struct timeval *tv_now(struct timeval *tv)
 {
        gettimeofday(tv, NULL);
        return tv;
@@ -101,7 +101,7 @@ REGPRM1 static inline struct timeval *tv_now(struct timeval *tv)
  * value in <interrupted> (a non-zero value means that we have not expired the
  * timeout).
  */
-REGPRM2 void tv_update_date(int max_wait, int interrupted);
+void tv_update_date(int max_wait, int interrupted);
 
 char *timeofday_as_iso_us(int pad);
 
@@ -110,7 +110,7 @@ char *timeofday_as_iso_us(int pad);
  * note that only tv_usec is necessary to detect it since a tv_usec > 999999
  * is normally not possible.
  */
-REGPRM1 static inline struct timeval *tv_eternity(struct timeval *tv)
+static inline struct timeval *tv_eternity(struct timeval *tv)
 {
        tv->tv_sec  = (typeof(tv->tv_sec))TV_ETERNITY;
        tv->tv_usec = (typeof(tv->tv_usec))TV_ETERNITY;
@@ -121,7 +121,7 @@ REGPRM1 static inline struct timeval *tv_eternity(struct timeval *tv)
  * sets a struct timeval to 0
  *
  */
-REGPRM1 static inline struct timeval *tv_zero(struct timeval *tv) {
+static inline struct timeval *tv_zero(struct timeval *tv) {
        tv->tv_sec = tv->tv_usec = 0;
        return tv;
 }
@@ -144,7 +144,7 @@ REGPRM1 static inline struct timeval *tv_zero(struct timeval *tv) {
 /*
  * Converts a struct timeval to a number of milliseconds.
  */
-REGPRM1 static inline unsigned long __tv_to_ms(const struct timeval *tv)
+static inline unsigned long __tv_to_ms(const struct timeval *tv)
 {
        unsigned long ret;
 
@@ -156,7 +156,7 @@ REGPRM1 static inline unsigned long __tv_to_ms(const struct timeval *tv)
 /*
  * Converts a struct timeval to a number of milliseconds.
  */
-REGPRM2 static inline struct timeval * __tv_from_ms(struct timeval *tv, unsigned long ms)
+static inline struct timeval * __tv_from_ms(struct timeval *tv, unsigned long ms)
 {
        tv->tv_sec = ms / 1000;
        tv->tv_usec = (ms % 1000) * 1000;
@@ -170,7 +170,7 @@ REGPRM2 static inline struct timeval * __tv_from_ms(struct timeval *tv, unsigned
  * which is almost twice as low as a direct usec to ms conversion. This version
  * also has the benefit of returning 1024 for 1000000.
  */
-REGPRM1 static inline unsigned int __usec_to_1024th(unsigned int usec)
+static inline unsigned int __usec_to_1024th(unsigned int usec)
 {
        return (usec * 1073 + 742516) >> 20;
 }
@@ -180,7 +180,7 @@ REGPRM1 static inline unsigned int __usec_to_1024th(unsigned int usec)
 
 
 /* tv_cmp: compares <tv1> and <tv2> : returns 0 if equal, -1 if tv1 < tv2, 1 if tv1 > tv2. */
-REGPRM2 static inline int __tv_cmp(const struct timeval *tv1, const struct timeval *tv2)
+static inline int __tv_cmp(const struct timeval *tv1, const struct timeval *tv2)
 {
        if ((unsigned)tv1->tv_sec < (unsigned)tv2->tv_sec)
                return -1;
@@ -196,7 +196,7 @@ REGPRM2 static inline int __tv_cmp(const struct timeval *tv1, const struct timev
 
 /* tv_iseq: compares <tv1> and <tv2> : returns 1 if tv1 == tv2, otherwise 0 */
 #define tv_iseq __tv_iseq
-REGPRM2 static inline int __tv_iseq(const struct timeval *tv1, const struct timeval *tv2)
+static inline int __tv_iseq(const struct timeval *tv1, const struct timeval *tv2)
 {
        return ((unsigned)tv1->tv_sec  == (unsigned)tv2->tv_sec) &&
                ((unsigned)tv1->tv_usec == (unsigned)tv2->tv_usec);
@@ -204,8 +204,8 @@ REGPRM2 static inline int __tv_iseq(const struct timeval *tv1, const struct time
 
 /* tv_isgt: compares <tv1> and <tv2> : returns 1 if tv1 > tv2, otherwise 0 */
 #define tv_isgt _tv_isgt
-REGPRM2 int _tv_isgt(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline int __tv_isgt(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_isgt(const struct timeval *tv1, const struct timeval *tv2);
+static inline int __tv_isgt(const struct timeval *tv1, const struct timeval *tv2)
 {
        return
                ((unsigned)tv1->tv_sec  == (unsigned)tv2->tv_sec) ?
@@ -215,7 +215,7 @@ REGPRM2 static inline int __tv_isgt(const struct timeval *tv1, const struct time
 
 /* tv_isge: compares <tv1> and <tv2> : returns 1 if tv1 >= tv2, otherwise 0 */
 #define tv_isge __tv_isge
-REGPRM2 static inline int __tv_isge(const struct timeval *tv1, const struct timeval *tv2)
+static inline int __tv_isge(const struct timeval *tv1, const struct timeval *tv2)
 {
        return
                ((unsigned)tv1->tv_sec  == (unsigned)tv2->tv_sec) ?
@@ -225,7 +225,7 @@ REGPRM2 static inline int __tv_isge(const struct timeval *tv1, const struct time
 
 /* tv_islt: compares <tv1> and <tv2> : returns 1 if tv1 < tv2, otherwise 0 */
 #define tv_islt __tv_islt
-REGPRM2 static inline int __tv_islt(const struct timeval *tv1, const struct timeval *tv2)
+static inline int __tv_islt(const struct timeval *tv1, const struct timeval *tv2)
 {
        return
                ((unsigned)tv1->tv_sec  == (unsigned)tv2->tv_sec) ?
@@ -235,8 +235,8 @@ REGPRM2 static inline int __tv_islt(const struct timeval *tv1, const struct time
 
 /* tv_isle: compares <tv1> and <tv2> : returns 1 if tv1 <= tv2, otherwise 0 */
 #define tv_isle _tv_isle
-REGPRM2 int _tv_isle(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline int __tv_isle(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_isle(const struct timeval *tv1, const struct timeval *tv2);
+static inline int __tv_isle(const struct timeval *tv1, const struct timeval *tv2)
 {
        return
                ((unsigned)tv1->tv_sec  == (unsigned)tv2->tv_sec) ?
@@ -249,8 +249,8 @@ REGPRM2 static inline int __tv_isle(const struct timeval *tv1, const struct time
  * Must not be used when either argument is eternity. Use tv_ms_cmp2() for that.
  */
 #define tv_ms_cmp _tv_ms_cmp
-REGPRM2 int _tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline int __tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2);
+static inline int __tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2)
 {
        if ((unsigned)tv1->tv_sec == (unsigned)tv2->tv_sec) {
                if ((unsigned)tv2->tv_usec >= (unsigned)tv1->tv_usec + 1000)
@@ -277,8 +277,8 @@ REGPRM2 static inline int __tv_ms_cmp(const struct timeval *tv1, const struct ti
  * assuming that TV_ETERNITY is greater than everything.
  */
 #define tv_ms_cmp2 _tv_ms_cmp2
-REGPRM2 int _tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline int __tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2);
+static inline int __tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2)
 {
        if (tv_iseternity(tv1))
                if (tv_iseternity(tv2))
@@ -297,8 +297,8 @@ REGPRM2 static inline int __tv_ms_cmp2(const struct timeval *tv1, const struct t
  * occurrences of (tv_ms_cmp2(tv,now) <= 0).
  */
 #define tv_ms_le2 _tv_ms_le2
-REGPRM2 int _tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline int __tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2);
+static inline int __tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2)
 {
        if (likely((unsigned)tv1->tv_sec > (unsigned)tv2->tv_sec + 1))
                return 0;
@@ -329,8 +329,8 @@ REGPRM2 static inline int __tv_ms_le2(const struct timeval *tv1, const struct ti
  * Must not be used when either argument is eternity.
  */
 #define tv_ms_elapsed __tv_ms_elapsed
-REGPRM2 unsigned long _tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline unsigned long __tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2);
+static inline unsigned long __tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2)
 {
        unsigned long ret;
 
@@ -346,8 +346,8 @@ REGPRM2 static inline unsigned long __tv_ms_elapsed(const struct timeval *tv1, c
  */
 
 #define tv_ms_remain __tv_ms_remain
-REGPRM2 unsigned long _tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline unsigned long __tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2);
+static inline unsigned long __tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2)
 {
        if (tv_ms_cmp(tv1, tv2) >= 0)
                return 0; /* event elapsed */
@@ -361,8 +361,8 @@ REGPRM2 static inline unsigned long __tv_ms_remain(const struct timeval *tv1, co
  * Returns TIME_ETERNITY if tv2 is eternity.
  */
 #define tv_ms_remain2 _tv_ms_remain2
-REGPRM2 unsigned long _tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2);
-REGPRM2 static inline unsigned long __tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2);
+static inline unsigned long __tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2)
 {
        if (tv_iseternity(tv2))
                return TIME_ETERNITY;
@@ -374,8 +374,8 @@ REGPRM2 static inline unsigned long __tv_ms_remain2(const struct timeval *tv1, c
  * adds <inc> to <from>, set the result to <tv> and returns a pointer <tv>
  */
 #define tv_add _tv_add
-REGPRM3 struct timeval *_tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc);
-REGPRM3 static inline struct timeval *__tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
+struct timeval *_tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc);
+static inline struct timeval *__tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
 {
        tv->tv_usec = from->tv_usec + inc->tv_usec;
        tv->tv_sec  = from->tv_sec  + inc->tv_sec;
@@ -392,8 +392,8 @@ REGPRM3 static inline struct timeval *__tv_add(struct timeval *tv, const struct
  * return 1, otherwise return 0. It is meant to be used in if conditions.
  */
 #define tv_add_ifset _tv_add_ifset
-REGPRM3 int _tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc);
-REGPRM3 static inline int __tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
+int _tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc);
+static inline int __tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
 {
        if (tv_iseternity(inc))
                return 0;
@@ -409,7 +409,7 @@ REGPRM3 static inline int __tv_add_ifset(struct timeval *tv, const struct timeva
 /*
  * adds <inc> to <tv> and returns a pointer <tv>
  */
-REGPRM2 static inline struct timeval *__tv_add2(struct timeval *tv, const struct timeval *inc)
+static inline struct timeval *__tv_add2(struct timeval *tv, const struct timeval *inc)
 {
        tv->tv_usec += inc->tv_usec;
        tv->tv_sec  += inc->tv_sec;
@@ -426,8 +426,8 @@ REGPRM2 static inline struct timeval *__tv_add2(struct timeval *tv, const struct
  * 0 is returned. The result is stored into tv.
  */
 #define tv_remain _tv_remain
-REGPRM3 struct timeval *_tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv);
-REGPRM3 static inline struct timeval *__tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
+struct timeval *_tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv);
+static inline struct timeval *__tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
 {
        tv->tv_usec = tv2->tv_usec - tv1->tv_usec;
        tv->tv_sec  = tv2->tv_sec  - tv1->tv_sec;
@@ -453,8 +453,8 @@ REGPRM3 static inline struct timeval *__tv_remain(const struct timeval *tv1, con
  * eternity.
  */
 #define tv_remain2 _tv_remain2
-REGPRM3 struct timeval *_tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv);
-REGPRM3 static inline struct timeval *__tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
+struct timeval *_tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv);
+static inline struct timeval *__tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
 {
        if (tv_iseternity(tv2))
                return tv_eternity(tv);
@@ -466,8 +466,8 @@ REGPRM3 static inline struct timeval *__tv_remain2(const struct timeval *tv1, co
  * adds <ms> ms to <from>, set the result to <tv> and returns a pointer <tv>
  */
 #define tv_ms_add _tv_ms_add
-REGPRM3 struct timeval *_tv_ms_add(struct timeval *tv, const struct timeval *from, int ms);
-REGPRM3 static inline struct timeval *__tv_ms_add(struct timeval *tv, const struct timeval *from, int ms)
+struct timeval *_tv_ms_add(struct timeval *tv, const struct timeval *from, int ms);
+static inline struct timeval *__tv_ms_add(struct timeval *tv, const struct timeval *from, int ms)
 {
        tv->tv_usec = from->tv_usec + (ms % 1000) * 1000;
        tv->tv_sec  = from->tv_sec  + (ms / 1000);
index dae1c90c9b1550c3b40287a2542d81b6dfe96aef..ffa1e0787194aea82e6b551c4900e0cf6c583864 100644 (file)
@@ -167,12 +167,12 @@ struct fdinfo {
 
 struct poller {
        void   *private;                                     /* any private data for the poller */
-       void REGPRM1   (*clo)(const int fd);                 /* mark <fd> as closed */
-       void REGPRM3   (*poll)(struct poller *p, int exp, int wake);  /* the poller itself */
-       int  REGPRM1   (*init)(struct poller *p);            /* poller initialization */
-       void REGPRM1   (*term)(struct poller *p);            /* termination of this poller */
-       int  REGPRM1   (*test)(struct poller *p);            /* pre-init check of the poller */
-       int  REGPRM1   (*fork)(struct poller *p);            /* post-fork re-opening */
+       void   (*clo)(const int fd);                 /* mark <fd> as closed */
+       void   (*poll)(struct poller *p, int exp, int wake);  /* the poller itself */
+       int    (*init)(struct poller *p);            /* poller initialization */
+       void   (*term)(struct poller *p);            /* termination of this poller */
+       int    (*test)(struct poller *p);            /* pre-init check of the poller */
+       int    (*fork)(struct poller *p);            /* post-fork re-opening */
        const char   *name;                                  /* poller name */
        unsigned int flags;                                  /* HAP_POLL_F_* */
        int    pref;                                         /* try pollers with higher preference first */
index bbba0ec4edbcf8734aaf82406342d7a9b77fde9f..5122510092e3411d0f2a5a6b8e59d4fc6aef0644 100644 (file)
@@ -45,7 +45,7 @@ static int epoll_fd[MAX_THREADS]; // per-thread epoll_fd
  * send us events even though this process closed the fd (see man 7 epoll,
  * "Questions and answers", Q 6).
  */
-REGPRM1 static void __fd_clo(int fd)
+static void __fd_clo(int fd)
 {
        if (unlikely(fdtab[fd].cloned)) {
                unsigned long m = polled_mask[fd].poll_recv | polled_mask[fd].poll_send;
@@ -134,7 +134,7 @@ static void _update_fd(int fd)
 /*
  * Linux epoll() poller
  */
-REGPRM3 static void _do_poll(struct poller *p, int exp, int wake)
+static void _do_poll(struct poller *p, int exp, int wake)
 {
        int status;
        int fd;
@@ -283,7 +283,7 @@ static void deinit_epoll_per_thread()
  * Returns 0 in case of failure, non-zero in case of success. If it fails, it
  * disables the poller by setting its pref to 0.
  */
-REGPRM1 static int _do_init(struct poller *p)
+static int _do_init(struct poller *p)
 {
        p->private = NULL;
 
@@ -305,7 +305,7 @@ REGPRM1 static int _do_init(struct poller *p)
  * Termination of the epoll() poller.
  * Memory is released and the poller is marked as unselectable.
  */
-REGPRM1 static void _do_term(struct poller *p)
+static void _do_term(struct poller *p)
 {
        if (epoll_fd[tid] >= 0) {
                close(epoll_fd[tid]);
@@ -320,7 +320,7 @@ REGPRM1 static void _do_term(struct poller *p)
  * Check that the poller works.
  * Returns 1 if OK, otherwise 0.
  */
-REGPRM1 static int _do_test(struct poller *p)
+static int _do_test(struct poller *p)
 {
        int fd;
 
@@ -337,7 +337,7 @@ REGPRM1 static int _do_test(struct poller *p)
  * epoll_fd. Some side effects were encountered because of this, such
  * as epoll_wait() returning an FD which was previously deleted.
  */
-REGPRM1 static int _do_fork(struct poller *p)
+static int _do_fork(struct poller *p)
 {
        if (epoll_fd[tid] >= 0)
                close(epoll_fd[tid]);
index 2aea201236df0ace18898e6b1c49cdc400e1957c..23591d229c11d5be3a8f4526631ca5b21594176a 100644 (file)
@@ -114,7 +114,7 @@ static void _update_fd(int fd)
  * "src/fd.c" for more information.
  */
 
-REGPRM3 static void _do_poll(struct poller *p, int exp, int wake)
+static void _do_poll(struct poller *p, int exp, int wake)
 {
        int i;
        int wait_time;
@@ -330,7 +330,7 @@ static void deinit_evports_per_thread()
  * Initialisation of the event ports poller.
  * Returns 0 in case of failure, non-zero in case of success.
  */
-REGPRM1 static int _do_init(struct poller *p)
+static int _do_init(struct poller *p)
 {
        p->private = NULL;
 
@@ -352,7 +352,7 @@ fail:
  * Termination of the event ports poller.
  * All resources are released and the poller is marked as inoperative.
  */
-REGPRM1 static void _do_term(struct poller *p)
+static void _do_term(struct poller *p)
 {
        if (evports_fd[tid] != -1) {
                close(evports_fd[tid]);
@@ -372,7 +372,7 @@ REGPRM1 static void _do_term(struct poller *p)
  * the poller to function correctly.
  * Returns 1 on success, otherwise 0.
  */
-REGPRM1 static int _do_test(struct poller *p)
+static int _do_test(struct poller *p)
 {
        int fd;
 
@@ -389,7 +389,7 @@ REGPRM1 static int _do_test(struct poller *p)
  * otherwise 0.  If this function fails, "_do_term()" must be called to
  * clean up the poller.
  */
-REGPRM1 static int _do_fork(struct poller *p)
+static int _do_fork(struct poller *p)
 {
        if (evports_fd[tid] != -1) {
                close(evports_fd[tid]);
index 3514f2d7b437e106e48216f2661aedd9cb0c5c54..852fa6e838ef64022cbc9013f77b006bccbbcd4b 100644 (file)
@@ -89,7 +89,7 @@ static int _update_fd(int fd, int start)
 /*
  * kqueue() poller
  */
-REGPRM3 static void _do_poll(struct poller *p, int exp, int wake)
+static void _do_poll(struct poller *p, int exp, int wake)
 {
        int status;
        int count, fd, wait_time;
@@ -261,7 +261,7 @@ static void deinit_kqueue_per_thread()
  * Returns 0 in case of failure, non-zero in case of success. If it fails, it
  * disables the poller by setting its pref to 0.
  */
-REGPRM1 static int _do_init(struct poller *p)
+static int _do_init(struct poller *p)
 {
        p->private = NULL;
 
@@ -294,7 +294,7 @@ fail_alloc:
  * Termination of the kqueue() poller.
  * Memory is released and the poller is marked as unselectable.
  */
-REGPRM1 static void _do_term(struct poller *p)
+static void _do_term(struct poller *p)
 {
        if (kqueue_fd[tid] >= 0) {
                close(kqueue_fd[tid]);
@@ -313,7 +313,7 @@ REGPRM1 static void _do_term(struct poller *p)
  * Check that the poller works.
  * Returns 1 if OK, otherwise 0.
  */
-REGPRM1 static int _do_test(struct poller *p)
+static int _do_test(struct poller *p)
 {
        int fd;
 
@@ -329,7 +329,7 @@ REGPRM1 static int _do_test(struct poller *p)
  * otherwise 0. Note that some pollers need to be reopened after a fork()
  * (such as kqueue), and some others may fail to do so in a chroot.
  */
-REGPRM1 static int _do_fork(struct poller *p)
+static int _do_fork(struct poller *p)
 {
        kqueue_fd[tid] = kqueue();
        if (kqueue_fd[tid] < 0)
index 47ce14bbf33206763858c52d4d33ced2105df4a1..538f0705723c90cac122cf68a014ced0e2f29038 100644 (file)
@@ -41,7 +41,7 @@ static unsigned int *fd_evts[2];
 static THREAD_LOCAL int nbfd = 0;
 static THREAD_LOCAL struct pollfd *poll_events = NULL;
 
-REGPRM1 static void __fd_clo(int fd)
+static void __fd_clo(int fd)
 {
        hap_fd_clr(fd, fd_evts[DIR_RD]);
        hap_fd_clr(fd, fd_evts[DIR_WR]);
@@ -98,7 +98,7 @@ static void _update_fd(int fd, int *max_add_fd)
 /*
  * Poll() poller
  */
-REGPRM3 static void _do_poll(struct poller *p, int exp, int wake)
+static void _do_poll(struct poller *p, int exp, int wake)
 {
        int status;
        int fd;
@@ -265,7 +265,7 @@ static void deinit_poll_per_thread()
  * Returns 0 in case of failure, non-zero in case of success. If it fails, it
  * disables the poller by setting its pref to 0.
  */
-REGPRM1 static int _do_init(struct poller *p)
+static int _do_init(struct poller *p)
 {
        __label__ fail_swevt, fail_srevt;
        int fd_evts_bytes;
@@ -295,7 +295,7 @@ REGPRM1 static int _do_init(struct poller *p)
  * Termination of the poll() poller.
  * Memory is released and the poller is marked as unselectable.
  */
-REGPRM1 static void _do_term(struct poller *p)
+static void _do_term(struct poller *p)
 {
        free(fd_evts[DIR_WR]);
        free(fd_evts[DIR_RD]);
@@ -307,7 +307,7 @@ REGPRM1 static void _do_term(struct poller *p)
  * Check that the poller works.
  * Returns 1 if OK, otherwise 0.
  */
-REGPRM1 static int _do_test(struct poller *p)
+static int _do_test(struct poller *p)
 {
        return 1;
 }
index dc66e71276c10b31b0d36e8cab226029ab6e5758..ab021b97f78e5ee793e478d151d5d1e9c466095d 100644 (file)
@@ -32,7 +32,7 @@ static unsigned int *fd_evts[2];
 static THREAD_LOCAL fd_set *tmp_evts[2];
 
 /* Immediately remove the entry upon close() */
-REGPRM1 static void __fd_clo(int fd)
+static void __fd_clo(int fd)
 {
        hap_fd_clr(fd, fd_evts[DIR_RD]);
        hap_fd_clr(fd, fd_evts[DIR_WR]);
@@ -89,7 +89,7 @@ static void _update_fd(int fd, int *max_add_fd)
 /*
  * Select() poller
  */
-REGPRM3 static void _do_poll(struct poller *p, int exp, int wake)
+static void _do_poll(struct poller *p, int exp, int wake)
 {
        int status;
        int fd, i;
@@ -247,7 +247,7 @@ static void deinit_select_per_thread()
  * Returns 0 in case of failure, non-zero in case of success. If it fails, it
  * disables the poller by setting its pref to 0.
  */
-REGPRM1 static int _do_init(struct poller *p)
+static int _do_init(struct poller *p)
 {
        __label__ fail_swevt, fail_srevt, fail_revt;
        int fd_set_bytes;
@@ -283,7 +283,7 @@ REGPRM1 static int _do_init(struct poller *p)
  * Termination of the select() poller.
  * Memory is released and the poller is marked as unselectable.
  */
-REGPRM1 static void _do_term(struct poller *p)
+static void _do_term(struct poller *p)
 {
        free(fd_evts[DIR_WR]);
        free(fd_evts[DIR_RD]);
@@ -295,7 +295,7 @@ REGPRM1 static void _do_term(struct poller *p)
  * Check that the poller works.
  * Returns 1 if OK, otherwise 0.
  */
-REGPRM1 static int _do_test(struct poller *p)
+static int _do_test(struct poller *p)
 {
        if (global.maxsock > FD_SETSIZE)
                return 0;
index 1a18c7641ee1f398654f3f52c14dcb1dbc6f2199..8e3afda0ea37dd0b0428b9af4cb44257472ab28a 100644 (file)
@@ -38,7 +38,7 @@ static THREAD_LOCAL char         iso_time_str[28]; /* ISO time representation of
 /*
  * adds <ms> ms to <from>, set the result to <tv> and returns a pointer <tv>
  */
-REGPRM3 struct timeval *_tv_ms_add(struct timeval *tv, const struct timeval *from, int ms)
+struct timeval *_tv_ms_add(struct timeval *tv, const struct timeval *from, int ms)
 {
        tv->tv_usec = from->tv_usec + (ms % 1000) * 1000;
        tv->tv_sec  = from->tv_sec  + (ms / 1000);
@@ -53,7 +53,7 @@ REGPRM3 struct timeval *_tv_ms_add(struct timeval *tv, const struct timeval *fro
  * compares <tv1> and <tv2> modulo 1ms: returns 0 if equal, -1 if tv1 < tv2, 1 if tv1 > tv2
  * Must not be used when either argument is eternity. Use tv_ms_cmp2() for that.
  */
-REGPRM2 int _tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_ms_cmp(tv1, tv2);
 }
@@ -62,7 +62,7 @@ REGPRM2 int _tv_ms_cmp(const struct timeval *tv1, const struct timeval *tv2)
  * compares <tv1> and <tv2> modulo 1 ms: returns 0 if equal, -1 if tv1 < tv2, 1 if tv1 > tv2,
  * assuming that TV_ETERNITY is greater than everything.
  */
-REGPRM2 int _tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_ms_cmp2(tv1, tv2);
 }
@@ -73,7 +73,7 @@ REGPRM2 int _tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2)
  * TV_ETERNITY, and always assumes that tv2 != TV_ETERNITY. Designed to replace
  * occurrences of (tv_ms_cmp2(tv,now) <= 0).
  */
-REGPRM2 int _tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_ms_le2(tv1, tv2);
 }
@@ -83,7 +83,7 @@ REGPRM2 int _tv_ms_le2(const struct timeval *tv1, const struct timeval *tv2)
  * if tv2 is passed, 0 is returned.
  * Must not be used when either argument is eternity.
  */
-REGPRM2 unsigned long _tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_remain(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_ms_remain(tv1, tv2);
 }
@@ -93,7 +93,7 @@ REGPRM2 unsigned long _tv_ms_remain(const struct timeval *tv1, const struct time
  * if tv2 is passed, 0 is returned.
  * Returns TIME_ETERNITY if tv2 is eternity.
  */
-REGPRM2 unsigned long _tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_remain2(const struct timeval *tv1, const struct timeval *tv2)
 {
        if (tv_iseternity(tv2))
                return TIME_ETERNITY;
@@ -105,7 +105,7 @@ REGPRM2 unsigned long _tv_ms_remain2(const struct timeval *tv1, const struct tim
  * Returns the time in ms elapsed between tv1 and tv2, assuming that tv1<=tv2.
  * Must not be used when either argument is eternity.
  */
-REGPRM2 unsigned long _tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2)
+unsigned long _tv_ms_elapsed(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_ms_elapsed(tv1, tv2);
 }
@@ -113,7 +113,7 @@ REGPRM2 unsigned long _tv_ms_elapsed(const struct timeval *tv1, const struct tim
 /*
  * adds <inc> to <from>, set the result to <tv> and returns a pointer <tv>
  */
-REGPRM3 struct timeval *_tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
+struct timeval *_tv_add(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
 {
        return __tv_add(tv, from, inc);
 }
@@ -122,7 +122,7 @@ REGPRM3 struct timeval *_tv_add(struct timeval *tv, const struct timeval *from,
  * If <inc> is set, then add it to <from> and set the result to <tv>, then
  * return 1, otherwise return 0. It is meant to be used in if conditions.
  */
-REGPRM3 int _tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
+int _tv_add_ifset(struct timeval *tv, const struct timeval *from, const struct timeval *inc)
 {
        return __tv_add_ifset(tv, from, inc);
 }
@@ -131,7 +131,7 @@ REGPRM3 int _tv_add_ifset(struct timeval *tv, const struct timeval *from, const
  * Computes the remaining time between tv1=now and event=tv2. if tv2 is passed,
  * 0 is returned. The result is stored into tv.
  */
-REGPRM3 struct timeval *_tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
+struct timeval *_tv_remain(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
 {
        return __tv_remain(tv1, tv2, tv);
 }
@@ -141,19 +141,19 @@ REGPRM3 struct timeval *_tv_remain(const struct timeval *tv1, const struct timev
  * 0 is returned. The result is stored into tv. Returns ETERNITY if tv2 is
  * eternity.
  */
-REGPRM3 struct timeval *_tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
+struct timeval *_tv_remain2(const struct timeval *tv1, const struct timeval *tv2, struct timeval *tv)
 {
        return __tv_remain2(tv1, tv2, tv);
 }
 
 /* tv_isle: compares <tv1> and <tv2> : returns 1 if tv1 <= tv2, otherwise 0 */
-REGPRM2 int _tv_isle(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_isle(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_isle(tv1, tv2);
 }
 
 /* tv_isgt: compares <tv1> and <tv2> : returns 1 if tv1 > tv2, otherwise 0 */
-REGPRM2 int _tv_isgt(const struct timeval *tv1, const struct timeval *tv2)
+int _tv_isgt(const struct timeval *tv1, const struct timeval *tv2)
 {
        return __tv_isgt(tv1, tv2);
 }
@@ -175,7 +175,7 @@ REGPRM2 int _tv_isgt(const struct timeval *tv1, const struct timeval *tv2)
  * microsecond adjustment. We cannot use a timeval for this since it's never
  * clearly specified whether a timeval may hold negative values or not.
  */
-REGPRM2 void tv_update_date(int max_wait, int interrupted)
+void tv_update_date(int max_wait, int interrupted)
 {
        struct timeval adjusted, deadline, tmp_now, tmp_adj;
        unsigned int   curr_sec_ms;     /* millisecond of current second (0..999) */