[PATCH 03/18] Replaced nxt_inline in .c files by static inline.

Alejandro Colomar alx.manpages at gmail.com
Thu Jun 2 18:04:57 UTC 2022


Keep the nxt_always_inline to avoid changing behavior.  But don't
repeat it in function definitions when it has already been
specified in the corresponding function prototype.

I put the attributes in a line preceeding the return type of the
function, since it seems to me a bit more readable.
---
 src/nxt_application.c         |  3 +-
 src/nxt_buf_filter.c          |  4 +-
 src/nxt_cache.c               |  6 ++-
 src/nxt_conf.c                |  3 +-
 src/nxt_conf_validation.c     |  7 ++--
 src/nxt_external.c            |  3 +-
 src/nxt_fastcgi_source.c      |  3 +-
 src/nxt_h1proto.c             |  6 +--
 src/nxt_http_parse.c          |  3 +-
 src/nxt_http_source.c         |  3 +-
 src/nxt_isolation.c           |  5 ++-
 src/nxt_mem_zone.c            |  3 +-
 src/nxt_mp.c                  |  9 ++--
 src/nxt_openssl.c             |  3 +-
 src/nxt_php_sapi.c            | 16 +++----
 src/nxt_port.c                |  3 +-
 src/nxt_port_hash.c           |  3 +-
 src/nxt_port_memory.c         |  3 +-
 src/nxt_port_rpc.c            |  6 ++-
 src/nxt_port_socket.c         |  9 ++--
 src/nxt_random.c              |  8 ++--
 src/nxt_rbtree.c              | 14 ++++---
 src/nxt_router.c              | 21 ++++++----
 src/nxt_runtime.c             |  3 +-
 src/nxt_unit.c                | 78 +++++++++++++++++++----------------
 src/nxt_websocket.c           | 12 ++++--
 src/nxt_work_queue.c          |  3 +-
 src/perl/nxt_perl_psgi.c      | 24 ++++++-----
 src/ruby/nxt_ruby.c           |  6 +--
 src/ruby/nxt_ruby_stream_io.c |  5 ++-
 src/test/nxt_rbtree1.c        | 14 ++++---
 src/test/nxt_rbtree1_test.c   |  6 ++-
 32 files changed, 175 insertions(+), 120 deletions(-)

diff --git a/src/nxt_application.c b/src/nxt_application.c
index 594574b..32295fd 100644
--- a/src/nxt_application.c
+++ b/src/nxt_application.c
@@ -1089,7 +1089,8 @@ static const nxt_lvlhsh_proto_t  lvlhsh_processes_proto  nxt_aligned(64) = {
 };
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_proto_process_lhq_pid(nxt_lvlhsh_query_t *lhq, nxt_pid_t *pid)
 {
     lhq->key_hash = nxt_murmur_hash2(pid, sizeof(nxt_pid_t));
diff --git a/src/nxt_buf_filter.c b/src/nxt_buf_filter.c
index 83e5baa..c59c875 100644
--- a/src/nxt_buf_filter.c
+++ b/src/nxt_buf_filter.c
@@ -8,7 +8,7 @@
 
 
 static nxt_int_t nxt_buf_filter_nobuf(nxt_buf_filter_t *f);
-nxt_inline void nxt_buf_filter_next(nxt_buf_filter_t *f);
+nxt_always_inline static inline void nxt_buf_filter_next(nxt_buf_filter_t *f);
 static void nxt_buf_filter_file_read_start(nxt_task_t *task,
     nxt_buf_filter_t *f);
 static void nxt_buf_filter_file_read(nxt_task_t *task, nxt_buf_filter_t *f);
@@ -195,7 +195,7 @@ nxt_buf_filter_nobuf(nxt_buf_filter_t *f)
 }
 
 
-nxt_inline void
+static inline void
 nxt_buf_filter_next(nxt_buf_filter_t *f)
 {
     if (f->output != NULL) {
diff --git a/src/nxt_cache.c b/src/nxt_cache.c
index e81d63d..1bfb8ea 100644
--- a/src/nxt_cache.c
+++ b/src/nxt_cache.c
@@ -108,7 +108,8 @@ nxt_cache_lvlhsh_test(nxt_lvlhsh_query_t *lhq, void *data)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_cache_lock(nxt_cache_t *cache)
 {
     if (cache->shared) {
@@ -117,7 +118,8 @@ nxt_cache_lock(nxt_cache_t *cache)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_cache_unlock(nxt_cache_t *cache)
 {
     if (cache->shared) {
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 79e776a..692a263 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -148,7 +148,8 @@ static u_char *nxt_conf_json_escape(u_char *dst, u_char *src, size_t size);
     ((p)[0] = '\r', (p)[1] = '\n', (p) + 2)
 
 
-nxt_inline u_char *
+nxt_always_inline
+static inline u_char *
 nxt_conf_json_indentation(u_char *p, uint32_t level)
 {
     while (level) {
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 60b9610..b2c8d46 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -76,8 +76,9 @@ static nxt_int_t nxt_conf_vldt_error(nxt_conf_validation_t *vldt,
     const char *fmt, ...);
 static nxt_int_t nxt_conf_vldt_var(nxt_conf_validation_t *vldt, nxt_str_t *name,
     nxt_str_t *value);
-NXT_MAYBE_UNUSED nxt_inline nxt_int_t nxt_conf_vldt_unsupported(
-    nxt_conf_validation_t *vldt, nxt_conf_value_t *value, void *data);
+NXT_MAYBE_UNUSED nxt_always_inline static inline nxt_int_t
+    nxt_conf_vldt_unsupported(nxt_conf_validation_t *vldt,
+    nxt_conf_value_t *value, void *data);
 
 static nxt_int_t nxt_conf_vldt_mtypes(nxt_conf_validation_t *vldt,
     nxt_conf_value_t *value, void *data);
@@ -1298,7 +1299,7 @@ nxt_conf_vldt_error(nxt_conf_validation_t *vldt, const char *fmt, ...)
 }
 
 
-nxt_inline nxt_int_t
+static inline nxt_int_t
 nxt_conf_vldt_unsupported(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
     void *data)
 {
diff --git a/src/nxt_external.c b/src/nxt_external.c
index c724b9b..19854d7 100644
--- a/src/nxt_external.c
+++ b/src/nxt_external.c
@@ -27,7 +27,8 @@ nxt_app_module_t  nxt_external_module = {
 extern char  **environ;
 
 
-nxt_inline nxt_int_t
+nxt_always_inline
+static inline nxt_int_t
 nxt_external_fd_no_cloexec(nxt_task_t *task, nxt_socket_t fd)
 {
     int  res, flags;
diff --git a/src/nxt_fastcgi_source.c b/src/nxt_fastcgi_source.c
index b242429..849dc89 100644
--- a/src/nxt_fastcgi_source.c
+++ b/src/nxt_fastcgi_source.c
@@ -27,7 +27,8 @@ typedef struct {
     } while (0)
 
 
-nxt_inline size_t
+nxt_always_inline
+static inline size_t
 nxt_fastcgi_param_length(u_char *p, uint32_t length)
 {
     if (nxt_fast_path(length < 128)) {
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index d334077..e4a12a3 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -60,8 +60,8 @@ static void nxt_h1p_conn_request_timeout(nxt_task_t *task, void *obj,
     void *data);
 static void nxt_h1p_conn_request_send_timeout(nxt_task_t *task, void *obj,
     void *data);
-nxt_inline void nxt_h1p_request_error(nxt_task_t *task, nxt_h1proto_t *h1p,
-    nxt_http_request_t *r);
+nxt_always_inline static inline void nxt_h1p_request_error(nxt_task_t *task,
+    nxt_h1proto_t *h1p, nxt_http_request_t *r);
 static void nxt_h1p_request_close(nxt_task_t *task, nxt_http_proto_t proto,
     nxt_socket_conf_joint_t *joint);
 static void nxt_h1p_conn_sent(nxt_task_t *task, void *obj, void *data);
@@ -1670,7 +1670,7 @@ nxt_h1p_conn_request_timer_value(nxt_conn_t *c, uintptr_t data)
 }
 
 
-nxt_inline void
+static inline void
 nxt_h1p_request_error(nxt_task_t *task, nxt_h1proto_t *h1p,
     nxt_http_request_t *r)
 {
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index 1ab6cc9..748423c 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -61,7 +61,8 @@ static const uint8_t  nxt_http_target_chars[256] nxt_aligned(64) = {
 };
 
 
-nxt_inline nxt_http_target_traps_e
+nxt_always_inline
+static inline nxt_http_target_traps_e
 nxt_http_parse_target(u_char **pos, u_char *end)
 {
     u_char      *p;
diff --git a/src/nxt_http_source.c b/src/nxt_http_source.c
index 889dcd0..f4d258d 100644
--- a/src/nxt_http_source.c
+++ b/src/nxt_http_source.c
@@ -109,7 +109,8 @@ fail:
 }
 
 
-nxt_inline u_char *
+nxt_always_inline
+static inline u_char *
 nxt_http_source_copy(u_char *p, nxt_str_t *src, size_t len)
 {
     u_char  *s;
diff --git a/src/nxt_isolation.c b/src/nxt_isolation.c
index e3cb1f2..767327d 100644
--- a/src/nxt_isolation.c
+++ b/src/nxt_isolation.c
@@ -49,7 +49,8 @@ static void nxt_isolation_unmount_all(nxt_task_t *task, nxt_process_t *process);
 static nxt_int_t nxt_isolation_pivot_root(nxt_task_t *task, const char *rootfs);
 static nxt_int_t nxt_isolation_make_private_mount(nxt_task_t *task,
     const char *rootfs);
-nxt_inline int nxt_pivot_root(const char *new_root, const char *old_root);
+nxt_always_inline static inline int nxt_pivot_root(const char *new_root,
+    const char *old_root);
 #endif
 
 static nxt_int_t nxt_isolation_chroot(nxt_task_t *task, const char *path);
@@ -1000,7 +1001,7 @@ fail:
 }
 
 
-nxt_inline int
+static inline int
 nxt_pivot_root(const char *new_root, const char *old_root)
 {
     return syscall(__NR_pivot_root, new_root, old_root);
diff --git a/src/nxt_mem_zone.c b/src/nxt_mem_zone.c
index f8ab09d..f5de448 100644
--- a/src/nxt_mem_zone.c
+++ b/src/nxt_mem_zone.c
@@ -367,7 +367,8 @@ nxt_mem_zone_slot_init(nxt_mem_zone_slot_t *slot, nxt_uint_t page_size)
  * described in "Bit Twiddling Hacks" by Sean Eron Anderson.
  */
 
-nxt_inline uint32_t
+nxt_always_inline
+static inline uint32_t
 nxt_next_highest_power_of_two(uint32_t n)
 {
     n--;
diff --git a/src/nxt_mp.c b/src/nxt_mp.c
index d0de2c0..0bcae6d 100644
--- a/src/nxt_mp.c
+++ b/src/nxt_mp.c
@@ -197,7 +197,8 @@ nxt_lg2(uint64_t v)
 
 #if (NXT_DEBUG)
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_mp_thread_assert(nxt_mp_t *mp)
 {
     nxt_tid_t     tid;
@@ -480,7 +481,8 @@ nxt_mp_zalign(nxt_mp_t *mp, size_t alignment, size_t size)
 }
 
 
-nxt_inline nxt_uint_t
+nxt_always_inline
+static inline nxt_uint_t
 nxt_mp_chunk_pages_index(nxt_mp_t *mp, size_t size)
 {
     nxt_int_t  n, index;
@@ -501,7 +503,8 @@ nxt_mp_chunk_pages_index(nxt_mp_t *mp, size_t size)
 
 #if !(NXT_DEBUG_MEMORY)
 
-nxt_inline u_char *
+nxt_always_inline
+static inline u_char *
 nxt_mp_page_addr(nxt_mp_t *mp, nxt_mp_page_t *page)
 {
     size_t          page_offset;
diff --git a/src/nxt_openssl.c b/src/nxt_openssl.c
index e19b138..29fcbcb 100644
--- a/src/nxt_openssl.c
+++ b/src/nxt_openssl.c
@@ -1217,7 +1217,8 @@ fail:
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_openssl_conn_free(nxt_task_t *task, nxt_conn_t *c)
 {
     nxt_openssl_conn_t  *tls;
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c
index 68ef07e..9190833 100644
--- a/src/nxt_php_sapi.c
+++ b/src/nxt_php_sapi.c
@@ -98,13 +98,14 @@ static void nxt_php_disable(nxt_task_t *task, const char *type,
 static nxt_int_t nxt_php_dirname(const nxt_str_t *file, nxt_str_t *dir);
 static void nxt_php_str_trim_trail(nxt_str_t *str, u_char t);
 static void nxt_php_str_trim_lead(nxt_str_t *str, u_char t);
-nxt_inline u_char *nxt_realpath(const void *c);
+nxt_always_inline static inline u_char *nxt_realpath(const void *c);
 
 static void nxt_php_request_handler(nxt_unit_request_info_t *req);
 static void nxt_php_dynamic_request(nxt_php_run_ctx_t *ctx,
     nxt_unit_request_t *r);
 static void nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r);
-nxt_inline void nxt_php_vcwd_chdir(nxt_unit_request_info_t *req, u_char *dir);
+nxt_always_inline static inline void nxt_php_vcwd_chdir(
+    nxt_unit_request_info_t *req, u_char *dir);
 
 static int nxt_php_startup(sapi_module_struct *sapi_module);
 static int nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC);
@@ -113,8 +114,9 @@ static void *nxt_php_hash_str_find_ptr(const HashTable *ht,
 static char *nxt_php_read_cookies(TSRMLS_D);
 static void nxt_php_set_sptr(nxt_unit_request_info_t *req, const char *name,
     nxt_unit_sptr_t *v, uint32_t len, zval *track_vars_array TSRMLS_DC);
-nxt_inline void nxt_php_set_str(nxt_unit_request_info_t *req, const char *name,
-    nxt_str_t *s, zval *track_vars_array TSRMLS_DC);
+nxt_always_inline static inline void nxt_php_set_str(
+    nxt_unit_request_info_t *req, const char *name, nxt_str_t *s,
+    zval *track_vars_array TSRMLS_DC);
 static void nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
     const char *str, uint32_t len, zval *track_vars_array TSRMLS_DC);
 static void nxt_php_register_variables(zval *track_vars_array TSRMLS_DC);
@@ -913,7 +915,7 @@ nxt_php_str_trim_lead(nxt_str_t *str, u_char t)
 }
 
 
-nxt_inline u_char *
+static inline u_char *
 nxt_realpath(const void *c)
 {
     return (u_char *) realpath(c, NULL);
@@ -1137,7 +1139,7 @@ nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r)
 }
 
 
-nxt_inline void
+static inline void
 nxt_php_vcwd_chdir(nxt_unit_request_info_t *req, u_char *dir)
 {
     if (nxt_slow_path(VCWD_CHDIR((char *) dir) != 0)) {
@@ -1415,7 +1417,7 @@ nxt_php_set_sptr(nxt_unit_request_info_t *req, const char *name,
 }
 
 
-nxt_inline void
+static inline void
 nxt_php_set_str(nxt_unit_request_info_t *req, const char *name,
     nxt_str_t *s, zval *track_vars_array TSRMLS_DC)
 {
diff --git a/src/nxt_port.c b/src/nxt_port.c
index ed7050f..81eb5db 100644
--- a/src/nxt_port.c
+++ b/src/nxt_port.c
@@ -199,7 +199,8 @@ nxt_port_quit_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
 
 
 /* TODO join with process_ready and move to nxt_main_process.c */
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt,
     nxt_port_t *new_port, uint32_t stream)
 {
diff --git a/src/nxt_port_hash.c b/src/nxt_port_hash.c
index b23acfb..2102826 100644
--- a/src/nxt_port_hash.c
+++ b/src/nxt_port_hash.c
@@ -48,7 +48,8 @@ nxt_port_hash_retrieve(nxt_lvlhsh_t *port_hash)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_port_hash_lhq(nxt_lvlhsh_query_t *lhq, nxt_pid_port_id_t *pid_port)
 {
     lhq->key_hash = nxt_murmur_hash2(pid_port, sizeof(nxt_pid_port_id_t));
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c
index e799f86..333592f 100644
--- a/src/nxt_port_memory.c
+++ b/src/nxt_port_memory.c
@@ -21,7 +21,8 @@ static void nxt_port_broadcast_shm_ack(nxt_task_t *task, nxt_port_t *port,
     void *data);
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_port_mmap_handler_use(nxt_port_mmap_handler_t *mmap_handler, int i)
 {
     int  c;
diff --git a/src/nxt_port_rpc.c b/src/nxt_port_rpc.c
index 0cac5cb..0443059 100644
--- a/src/nxt_port_rpc.c
+++ b/src/nxt_port_rpc.c
@@ -68,7 +68,8 @@ static const nxt_lvlhsh_proto_t  lvlhsh_rpc_reg_proto  nxt_aligned(64) = {
 };
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_port_rpc_lhq_stream(nxt_lvlhsh_query_t *lhq, uint32_t *stream)
 {
     lhq->key_hash = nxt_murmur_hash2(stream, sizeof(*stream));
@@ -78,7 +79,8 @@ nxt_port_rpc_lhq_stream(nxt_lvlhsh_query_t *lhq, uint32_t *stream)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_port_rpc_lhq_peer(nxt_lvlhsh_query_t *lhq, nxt_pid_t *peer)
 {
     lhq->key_hash = nxt_murmur_hash2(peer, sizeof(*peer));
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c
index 2a51dfb..30ec449 100644
--- a/src/nxt_port_socket.c
+++ b/src/nxt_port_socket.c
@@ -22,8 +22,9 @@ static nxt_int_t nxt_port_msg_chk_insert(nxt_task_t *task, nxt_port_t *port,
 static nxt_port_send_msg_t *nxt_port_msg_alloc(nxt_port_send_msg_t *m);
 static void nxt_port_write_handler(nxt_task_t *task, void *obj, void *data);
 static nxt_port_send_msg_t *nxt_port_msg_first(nxt_port_t *port);
-nxt_inline void nxt_port_msg_close_fd(nxt_port_send_msg_t *msg);
-nxt_inline void nxt_port_close_fds(nxt_fd_t *fd);
+nxt_always_inline static inline void nxt_port_msg_close_fd(
+    nxt_port_send_msg_t *msg);
+nxt_always_inline static inline void nxt_port_close_fds(nxt_fd_t *fd);
 static nxt_buf_t *nxt_port_buf_completion(nxt_task_t *task,
     nxt_work_queue_t *wq, nxt_buf_t *b, size_t sent, nxt_bool_t mmap_mode);
 static nxt_port_send_msg_t *nxt_port_msg_insert_tail(nxt_port_t *port,
@@ -588,7 +589,7 @@ nxt_port_msg_first(nxt_port_t *port)
 }
 
 
-nxt_inline void
+static inline void
 nxt_port_msg_close_fd(nxt_port_send_msg_t *msg)
 {
     if (!msg->close_fd) {
@@ -599,7 +600,7 @@ nxt_port_msg_close_fd(nxt_port_send_msg_t *msg)
 }
 
 
-nxt_inline void
+static inline void
 nxt_port_close_fds(nxt_fd_t *fd)
 {
     if (fd[0] != -1) {
diff --git a/src/nxt_random.c b/src/nxt_random.c
index 1211896..d2385f5 100644
--- a/src/nxt_random.c
+++ b/src/nxt_random.c
@@ -18,10 +18,10 @@
 #define NXT_RANDOM_KEY_SIZE  128
 
 
-nxt_inline void nxt_random_start_schedule(nxt_random_t *r);
+nxt_always_inline static inline void nxt_random_start_schedule(nxt_random_t *r);
 static void nxt_random_stir(nxt_random_t *r);
 static void nxt_random_add(nxt_random_t *r, const u_char *key, uint32_t len);
-nxt_inline uint8_t nxt_random_byte(nxt_random_t *r);
+nxt_always_inline static inline uint8_t nxt_random_byte(nxt_random_t *r);
 
 
 void
@@ -33,7 +33,7 @@ nxt_random_init(nxt_random_t *r)
 }
 
 
-nxt_inline void
+static inline void
 nxt_random_start_schedule(nxt_random_t *r)
 {
     nxt_uint_t  i;
@@ -157,7 +157,7 @@ nxt_random(nxt_random_t *r)
 }
 
 
-nxt_inline uint8_t
+static inline uint8_t
 nxt_random_byte(nxt_random_t *r)
 {
     uint8_t  si, sj;
diff --git a/src/nxt_rbtree.c b/src/nxt_rbtree.c
index 4a0f9c2..337638d 100644
--- a/src/nxt_rbtree.c
+++ b/src/nxt_rbtree.c
@@ -16,10 +16,12 @@
 static void nxt_rbtree_insert_fixup(nxt_rbtree_node_t *node);
 static void nxt_rbtree_delete_fixup(nxt_rbtree_t *tree,
     nxt_rbtree_node_t *node);
-nxt_inline void nxt_rbtree_left_rotate(nxt_rbtree_node_t *node);
-nxt_inline void nxt_rbtree_right_rotate(nxt_rbtree_node_t *node);
-nxt_inline void nxt_rbtree_parent_relink(nxt_rbtree_node_t *subst,
+nxt_always_inline static inline void nxt_rbtree_left_rotate(
     nxt_rbtree_node_t *node);
+nxt_always_inline static inline void nxt_rbtree_right_rotate(
+    nxt_rbtree_node_t *node);
+nxt_always_inline static inline void nxt_rbtree_parent_relink(
+    nxt_rbtree_node_t *subst, nxt_rbtree_node_t *node);
 
 
 #define NXT_RBTREE_BLACK  0
@@ -445,7 +447,7 @@ nxt_rbtree_delete_fixup(nxt_rbtree_t *tree, nxt_rbtree_node_t *node)
 }
 
 
-nxt_inline void
+static inline void
 nxt_rbtree_left_rotate(nxt_rbtree_node_t *node)
 {
     nxt_rbtree_node_t  *child;
@@ -461,7 +463,7 @@ nxt_rbtree_left_rotate(nxt_rbtree_node_t *node)
 }
 
 
-nxt_inline void
+static inline void
 nxt_rbtree_right_rotate(nxt_rbtree_node_t *node)
 {
     nxt_rbtree_node_t  *child;
@@ -479,7 +481,7 @@ nxt_rbtree_right_rotate(nxt_rbtree_node_t *node)
 
 /* Relink a parent from the node to the subst node. */
 
-nxt_inline void
+static inline void
 nxt_rbtree_parent_relink(nxt_rbtree_node_t *subst, nxt_rbtree_node_t *node)
 {
     nxt_rbtree_node_t  *parent, **link;
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 3a32a36..a89bad6 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -535,7 +535,8 @@ nxt_router_start_app_process(nxt_task_t *task, nxt_app_t *app)
 }
 
 
-nxt_inline nxt_bool_t
+nxt_always_inline
+static inline nxt_bool_t
 nxt_router_msg_cancel(nxt_task_t *task, nxt_request_rpc_data_t *req_rpc_data)
 {
     nxt_buf_t       *b, *next;
@@ -582,7 +583,8 @@ nxt_router_msg_cancel(nxt_task_t *task, nxt_request_rpc_data_t *req_rpc_data)
 }
 
 
-nxt_inline nxt_bool_t
+nxt_always_inline
+static inline nxt_bool_t
 nxt_queue_chk_remove(nxt_queue_link_t *lnk)
 {
     if (lnk->next != NULL) {
@@ -597,7 +599,8 @@ nxt_queue_chk_remove(nxt_queue_link_t *lnk)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_request_rpc_data_unlink(nxt_task_t *task,
     nxt_request_rpc_data_t *req_rpc_data)
 {
@@ -1051,7 +1054,8 @@ fail:
 }
 
 
-nxt_inline nxt_bool_t
+nxt_always_inline
+static inline nxt_bool_t
 nxt_router_app_can_start(nxt_app_t *app)
 {
     return app->processes + app->pending_processes < app->max_processes
@@ -1059,7 +1063,8 @@ nxt_router_app_can_start(nxt_app_t *app)
 }
 
 
-nxt_inline nxt_bool_t
+nxt_always_inline
+static inline nxt_bool_t
 nxt_router_app_need_start(nxt_app_t *app)
 {
     return (app->active_requests
@@ -3455,7 +3460,8 @@ nxt_router_listen_socket_create(nxt_task_t *task, void *obj, void *data)
 }
 
 
-nxt_inline nxt_listen_event_t *
+nxt_always_inline
+static inline nxt_listen_event_t *
 nxt_router_listen_event(nxt_queue_t *listen_connections,
     nxt_socket_conf_t *skcf)
 {
@@ -4692,7 +4698,8 @@ nxt_router_app_port_error(nxt_task_t *task, nxt_port_recv_msg_t *msg,
 }
 
 
-nxt_inline nxt_port_t *
+nxt_always_inline
+static inline nxt_port_t *
 nxt_router_app_get_port_for_quit(nxt_task_t *task, nxt_app_t *app)
 {
     nxt_port_t  *port;
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index 46955f1..6046a1b 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -1446,7 +1446,8 @@ static const nxt_lvlhsh_proto_t  lvlhsh_processes_proto  nxt_aligned(64) = {
 };
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_runtime_process_lhq_pid(nxt_lvlhsh_query_t *lhq, nxt_pid_t *pid)
 {
     lhq->key_hash = nxt_murmur_hash2(pid, sizeof(*pid));
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 32bb07a..f3f8bb9 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -44,15 +44,16 @@ typedef struct nxt_unit_websocket_frame_impl_s  nxt_unit_websocket_frame_impl_t;
 static nxt_unit_impl_t *nxt_unit_create(nxt_unit_init_t *init);
 static int nxt_unit_ctx_init(nxt_unit_impl_t *lib,
     nxt_unit_ctx_impl_t *ctx_impl, void *data);
-nxt_inline void nxt_unit_ctx_use(nxt_unit_ctx_t *ctx);
-nxt_inline void nxt_unit_ctx_release(nxt_unit_ctx_t *ctx);
-nxt_inline void nxt_unit_lib_use(nxt_unit_impl_t *lib);
-nxt_inline void nxt_unit_lib_release(nxt_unit_impl_t *lib);
-nxt_inline void nxt_unit_mmap_buf_insert(nxt_unit_mmap_buf_t **head,
+nxt_always_inline static inline void nxt_unit_ctx_use(nxt_unit_ctx_t *ctx);
+nxt_always_inline static inline void nxt_unit_ctx_release(nxt_unit_ctx_t *ctx);
+nxt_always_inline static inline void nxt_unit_lib_use(nxt_unit_impl_t *lib);
+nxt_always_inline static inline void nxt_unit_lib_release(nxt_unit_impl_t *lib);
+nxt_always_inline static inline void nxt_unit_mmap_buf_insert(
+    nxt_unit_mmap_buf_t **head, nxt_unit_mmap_buf_t *mmap_buf);
+nxt_always_inline static inline void nxt_unit_mmap_buf_insert_tail(
+    nxt_unit_mmap_buf_t **prev, nxt_unit_mmap_buf_t *mmap_buf);
+nxt_always_inline static inline void nxt_unit_mmap_buf_unlink(
     nxt_unit_mmap_buf_t *mmap_buf);
-nxt_inline void nxt_unit_mmap_buf_insert_tail(nxt_unit_mmap_buf_t **prev,
-    nxt_unit_mmap_buf_t *mmap_buf);
-nxt_inline void nxt_unit_mmap_buf_unlink(nxt_unit_mmap_buf_t *mmap_buf);
 static int nxt_unit_read_env(nxt_unit_port_t *ready_port,
     nxt_unit_port_t *router_port, nxt_unit_port_t *read_port,
     int *shared_port_fd, int *shared_queue_fd,
@@ -117,8 +118,10 @@ static int nxt_unit_incoming_mmap(nxt_unit_ctx_t *ctx, pid_t pid, int fd);
 static void nxt_unit_awake_ctx(nxt_unit_ctx_t *ctx,
     nxt_unit_ctx_impl_t *ctx_impl);
 static void nxt_unit_mmaps_init(nxt_unit_mmaps_t *mmaps);
-nxt_inline void nxt_unit_process_use(nxt_unit_process_t *process);
-nxt_inline void nxt_unit_process_release(nxt_unit_process_t *process);
+nxt_always_inline static inline void nxt_unit_process_use(
+    nxt_unit_process_t *process);
+nxt_always_inline static inline void nxt_unit_process_release(
+    nxt_unit_process_t *process);
 static void nxt_unit_mmaps_destroy(nxt_unit_mmaps_t *mmaps);
 static int nxt_unit_check_rbuf_mmap(nxt_unit_ctx_t *ctx,
     nxt_unit_mmaps_t *mmaps, pid_t pid, uint32_t id,
@@ -139,10 +142,13 @@ static int nxt_unit_read_buf(nxt_unit_ctx_t *ctx, nxt_unit_read_buf_t *rbuf);
 static int nxt_unit_chk_ready(nxt_unit_ctx_t *ctx);
 static int nxt_unit_process_pending_rbuf(nxt_unit_ctx_t *ctx);
 static void nxt_unit_process_ready_req(nxt_unit_ctx_t *ctx);
-nxt_inline int nxt_unit_is_read_queue(nxt_unit_read_buf_t *rbuf);
-nxt_inline int nxt_unit_is_read_socket(nxt_unit_read_buf_t *rbuf);
-nxt_inline int nxt_unit_is_shm_ack(nxt_unit_read_buf_t *rbuf);
-nxt_inline int nxt_unit_is_quit(nxt_unit_read_buf_t *rbuf);
+nxt_always_inline static inline int nxt_unit_is_read_queue(
+    nxt_unit_read_buf_t *rbuf);
+nxt_always_inline static inline int nxt_unit_is_read_socket(
+    nxt_unit_read_buf_t *rbuf);
+nxt_always_inline static inline int nxt_unit_is_shm_ack(
+    nxt_unit_read_buf_t *rbuf);
+nxt_always_inline static inline int nxt_unit_is_quit(nxt_unit_read_buf_t *rbuf);
 static int nxt_unit_process_port_msg_impl(nxt_unit_ctx_t *ctx,
     nxt_unit_port_t *port);
 static void nxt_unit_ctx_free(nxt_unit_ctx_impl_t *ctx_impl);
@@ -151,8 +157,10 @@ static nxt_unit_port_t *nxt_unit_create_port(nxt_unit_ctx_t *ctx);
 static int nxt_unit_send_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *dst,
     nxt_unit_port_t *port, int queue_fd);
 
-nxt_inline void nxt_unit_port_use(nxt_unit_port_t *port);
-nxt_inline void nxt_unit_port_release(nxt_unit_port_t *port);
+nxt_always_inline static inline void nxt_unit_port_use(
+    nxt_unit_port_t *port);
+nxt_always_inline static inline void nxt_unit_port_release(
+    nxt_unit_port_t *port);
 static nxt_unit_port_t *nxt_unit_add_port(nxt_unit_ctx_t *ctx,
     nxt_unit_port_t *port, void *queue);
 static void nxt_unit_process_awaiting_req(nxt_unit_ctx_t *ctx,
@@ -173,7 +181,7 @@ static ssize_t nxt_unit_sendmsg(nxt_unit_ctx_t *ctx, int fd,
     const void *buf, size_t buf_size, const nxt_send_oob_t *oob);
 static int nxt_unit_ctx_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
     nxt_unit_read_buf_t *rbuf);
-nxt_inline void nxt_unit_rbuf_cpy(nxt_unit_read_buf_t *dst,
+nxt_always_inline static inline void nxt_unit_rbuf_cpy(nxt_unit_read_buf_t *dst,
     nxt_unit_read_buf_t *src);
 static int nxt_unit_shared_port_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
     nxt_unit_read_buf_t *rbuf);
@@ -183,7 +191,7 @@ static int nxt_unit_port_queue_recv(nxt_unit_port_t *port,
     nxt_unit_read_buf_t *rbuf);
 static int nxt_unit_app_queue_recv(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port,
     nxt_unit_read_buf_t *rbuf);
-nxt_inline int nxt_unit_close(int fd);
+nxt_always_inline static inline int nxt_unit_close(int fd);
 static int nxt_unit_fd_blocking(int fd);
 
 static int nxt_unit_port_hash_add(nxt_lvlhsh_t *port_hash,
@@ -707,7 +715,7 @@ nxt_unit_ctx_init(nxt_unit_impl_t *lib, nxt_unit_ctx_impl_t *ctx_impl,
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_ctx_use(nxt_unit_ctx_t *ctx)
 {
     nxt_unit_ctx_impl_t  *ctx_impl;
@@ -718,7 +726,7 @@ nxt_unit_ctx_use(nxt_unit_ctx_t *ctx)
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_ctx_release(nxt_unit_ctx_t *ctx)
 {
     long                 c;
@@ -734,14 +742,14 @@ nxt_unit_ctx_release(nxt_unit_ctx_t *ctx)
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_lib_use(nxt_unit_impl_t *lib)
 {
     nxt_atomic_fetch_add(&lib->use_count, 1);
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_lib_release(nxt_unit_impl_t *lib)
 {
     long                c;
@@ -781,7 +789,7 @@ nxt_unit_lib_release(nxt_unit_impl_t *lib)
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_mmap_buf_insert(nxt_unit_mmap_buf_t **head,
     nxt_unit_mmap_buf_t *mmap_buf)
 {
@@ -796,7 +804,7 @@ nxt_unit_mmap_buf_insert(nxt_unit_mmap_buf_t **head,
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_mmap_buf_insert_tail(nxt_unit_mmap_buf_t **prev,
     nxt_unit_mmap_buf_t *mmap_buf)
 {
@@ -808,7 +816,7 @@ nxt_unit_mmap_buf_insert_tail(nxt_unit_mmap_buf_t **prev,
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_mmap_buf_unlink(nxt_unit_mmap_buf_t *mmap_buf)
 {
     nxt_unit_mmap_buf_t  **prev;
@@ -4115,14 +4123,14 @@ nxt_unit_mmaps_init(nxt_unit_mmaps_t *mmaps)
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_process_use(nxt_unit_process_t *process)
 {
     nxt_atomic_fetch_add(&process->use_count, 1);
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_process_release(nxt_unit_process_t *process)
 {
     long c;
@@ -4885,7 +4893,7 @@ nxt_unit_run_ctx(nxt_unit_ctx_t *ctx)
 }
 
 
-nxt_inline int
+static inline int
 nxt_unit_is_read_queue(nxt_unit_read_buf_t *rbuf)
 {
     nxt_port_msg_t  *port_msg;
@@ -4900,7 +4908,7 @@ nxt_unit_is_read_queue(nxt_unit_read_buf_t *rbuf)
 }
 
 
-nxt_inline int
+static inline int
 nxt_unit_is_read_socket(nxt_unit_read_buf_t *rbuf)
 {
     if (nxt_fast_path(rbuf->size == 1)) {
@@ -4911,7 +4919,7 @@ nxt_unit_is_read_socket(nxt_unit_read_buf_t *rbuf)
 }
 
 
-nxt_inline int
+static inline int
 nxt_unit_is_shm_ack(nxt_unit_read_buf_t *rbuf)
 {
     nxt_port_msg_t  *port_msg;
@@ -4926,7 +4934,7 @@ nxt_unit_is_shm_ack(nxt_unit_read_buf_t *rbuf)
 }
 
 
-nxt_inline int
+static inline int
 nxt_unit_is_quit(nxt_unit_read_buf_t *rbuf)
 {
     nxt_port_msg_t  *port_msg;
@@ -5372,7 +5380,7 @@ nxt_unit_send_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *dst,
 }
 
 
-nxt_inline void nxt_unit_port_use(nxt_unit_port_t *port)
+static inline void nxt_unit_port_use(nxt_unit_port_t *port)
 {
     nxt_unit_port_impl_t  *port_impl;
 
@@ -5382,7 +5390,7 @@ nxt_inline void nxt_unit_port_use(nxt_unit_port_t *port)
 }
 
 
-nxt_inline void nxt_unit_port_release(nxt_unit_port_t *port)
+static inline void nxt_unit_port_release(nxt_unit_port_t *port)
 {
     long                  c;
     nxt_unit_port_impl_t  *port_impl;
@@ -6133,7 +6141,7 @@ retry:
 }
 
 
-nxt_inline void
+static inline void
 nxt_unit_rbuf_cpy(nxt_unit_read_buf_t *dst, nxt_unit_read_buf_t *src)
 {
     memcpy(dst->buf, src->buf, src->size);
@@ -6316,7 +6324,7 @@ retry:
 }
 
 
-nxt_inline int
+static inline int
 nxt_unit_close(int fd)
 {
     int  res;
diff --git a/src/nxt_websocket.c b/src/nxt_websocket.c
index 9100223..a1bdafa 100644
--- a/src/nxt_websocket.c
+++ b/src/nxt_websocket.c
@@ -8,14 +8,16 @@
 #include <nxt_websocket_header.h>
 
 
-nxt_inline uint16_t
+nxt_always_inline
+static inline uint16_t
 nxt_ntoh16(const uint8_t *b)
 {
     return ((uint16_t) b[0]) << 8 | ((uint16_t) b[1]);
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_hton16(uint8_t *b, uint16_t v)
 {
     b[0] = (v >> 8);
@@ -23,7 +25,8 @@ nxt_hton16(uint8_t *b, uint16_t v)
 }
 
 
-nxt_inline uint64_t
+nxt_always_inline
+static inline uint64_t
 nxt_ntoh64(const uint8_t *b)
 {
     return  ((uint64_t) b[0]) << 56
@@ -37,7 +40,8 @@ nxt_ntoh64(const uint8_t *b)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_hton64(uint8_t *b, uint64_t v)
 {
     b[0] = (v >> 56);
diff --git a/src/nxt_work_queue.c b/src/nxt_work_queue.c
index f38f700..e4cd87e 100644
--- a/src/nxt_work_queue.c
+++ b/src/nxt_work_queue.c
@@ -34,7 +34,8 @@ static nxt_uint_t  nxt_work_queue_bucket_items = 409;
 
 #if (NXT_DEBUG)
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_work_queue_thread_assert(nxt_work_queue_t *wq)
 {
     nxt_tid_t     tid;
diff --git a/src/perl/nxt_perl_psgi.c b/src/perl/nxt_perl_psgi.c
index 08a6f29..96a6519 100644
--- a/src/perl/nxt_perl_psgi.c
+++ b/src/perl/nxt_perl_psgi.c
@@ -61,12 +61,15 @@ static int nxt_perl_psgi_ctx_init(const char *script,
 
 static SV *nxt_perl_psgi_env_create(PerlInterpreter *my_perl,
     nxt_unit_request_info_t *req);
-nxt_inline int nxt_perl_psgi_add_sptr(PerlInterpreter *my_perl, HV *hash_env,
-    const char *name, uint32_t name_len, nxt_unit_sptr_t *sptr, uint32_t len);
-nxt_inline int nxt_perl_psgi_add_str(PerlInterpreter *my_perl, HV *hash_env,
-    const char *name, uint32_t name_len, const char *str, uint32_t len);
-nxt_inline int nxt_perl_psgi_add_value(PerlInterpreter *my_perl, HV *hash_env,
-    const char *name, uint32_t name_len, void *value);
+nxt_always_inline static inline int nxt_perl_psgi_add_sptr(
+    PerlInterpreter *my_perl, HV *hash_env, const char *name, uint32_t name_len,
+    nxt_unit_sptr_t *sptr, uint32_t len);
+nxt_always_inline static inline int nxt_perl_psgi_add_str(
+    PerlInterpreter *my_perl, HV *hash_env, const char *name, uint32_t name_len,
+    const char *str, uint32_t len);
+nxt_always_inline static inline int nxt_perl_psgi_add_value(
+    PerlInterpreter *my_perl, HV *hash_env, const char *name, uint32_t name_len,
+    void *value);
 
 
 static char *nxt_perl_psgi_module_create(const char *script);
@@ -226,7 +229,8 @@ XS(XS_NGINX__Unit__Sandbox_write)
 }
 
 
-nxt_inline void
+nxt_always_inline
+static inline void
 nxt_perl_psgi_cb_request_done(nxt_perl_psgi_ctx_t *pctx, int status)
 {
     if (pctx->req != NULL) {
@@ -712,7 +716,7 @@ fail:
 }
 
 
-nxt_inline int
+static inline int
 nxt_perl_psgi_add_sptr(PerlInterpreter *my_perl, HV *hash_env,
     const char *name, uint32_t name_len, nxt_unit_sptr_t *sptr, uint32_t len)
 {
@@ -721,7 +725,7 @@ nxt_perl_psgi_add_sptr(PerlInterpreter *my_perl, HV *hash_env,
 }
 
 
-nxt_inline int
+static inline int
 nxt_perl_psgi_add_str(PerlInterpreter *my_perl, HV *hash_env,
     const char *name, uint32_t name_len, const char *str, uint32_t len)
 {
@@ -737,7 +741,7 @@ nxt_perl_psgi_add_str(PerlInterpreter *my_perl, HV *hash_env,
 }
 
 
-nxt_inline int
+static inline int
 nxt_perl_psgi_add_value(PerlInterpreter *my_perl, HV *hash_env,
     const char *name, uint32_t name_len, void *value)
 {
diff --git a/src/ruby/nxt_ruby.c b/src/ruby/nxt_ruby.c
index 8f4afd3..1d2c7ed 100644
--- a/src/ruby/nxt_ruby.c
+++ b/src/ruby/nxt_ruby.c
@@ -56,8 +56,8 @@ static void nxt_ruby_join_threads(nxt_unit_ctx_t *ctx,
 
 static VALUE nxt_ruby_rack_app_run(VALUE arg);
 static int nxt_ruby_read_request(nxt_unit_request_info_t *req, VALUE hash_env);
-nxt_inline void nxt_ruby_add_sptr(VALUE hash_env, VALUE name,
-    nxt_unit_sptr_t *sptr, uint32_t len);
+nxt_always_inline static inline void nxt_ruby_add_sptr(VALUE hash_env,
+    VALUE name, nxt_unit_sptr_t *sptr, uint32_t len);
 static nxt_int_t nxt_ruby_rack_result_status(nxt_unit_request_info_t *req,
     VALUE result);
 static int nxt_ruby_rack_result_headers(nxt_unit_request_info_t *req,
@@ -816,7 +816,7 @@ nxt_ruby_read_request(nxt_unit_request_info_t *req, VALUE hash_env)
 }
 
 
-nxt_inline void
+static inline void
 nxt_ruby_add_sptr(VALUE hash_env, VALUE name,
     nxt_unit_sptr_t *sptr, uint32_t len)
 {
diff --git a/src/ruby/nxt_ruby_stream_io.c b/src/ruby/nxt_ruby_stream_io.c
index 4ef69ce..73739c4 100644
--- a/src/ruby/nxt_ruby_stream_io.c
+++ b/src/ruby/nxt_ruby_stream_io.c
@@ -16,7 +16,8 @@ static VALUE nxt_ruby_stream_io_read(VALUE obj, VALUE args);
 static VALUE nxt_ruby_stream_io_rewind(VALUE obj);
 static VALUE nxt_ruby_stream_io_puts(VALUE obj, VALUE args);
 static VALUE nxt_ruby_stream_io_write(VALUE obj, VALUE args);
-nxt_inline long nxt_ruby_stream_io_s_write(nxt_ruby_ctx_t *rctx, VALUE val);
+nxt_always_inline static inline long nxt_ruby_stream_io_s_write(
+    nxt_ruby_ctx_t *rctx, VALUE val);
 static VALUE nxt_ruby_stream_io_flush(VALUE obj);
 static VALUE nxt_ruby_stream_io_close(VALUE obj);
 
@@ -234,7 +235,7 @@ nxt_ruby_stream_io_write(VALUE obj, VALUE args)
 }
 
 
-nxt_inline long
+static inline long
 nxt_ruby_stream_io_s_write(nxt_ruby_ctx_t *rctx, VALUE val)
 {
     if (nxt_slow_path(val == Qnil)) {
diff --git a/src/test/nxt_rbtree1.c b/src/test/nxt_rbtree1.c
index 1ae059a..f551f08 100644
--- a/src/test/nxt_rbtree1.c
+++ b/src/test/nxt_rbtree1.c
@@ -15,10 +15,12 @@
  */
 
 
-nxt_inline void nxt_rbtree1_left_rotate(nxt_rbtree1_node_t **root,
-    nxt_rbtree1_node_t *sentinel, nxt_rbtree1_node_t *node);
-nxt_inline void nxt_rbtree1_right_rotate(nxt_rbtree1_node_t **root,
-    nxt_rbtree1_node_t *sentinel, nxt_rbtree1_node_t *node);
+nxt_always_inline static inline void nxt_rbtree1_left_rotate(
+    nxt_rbtree1_node_t **root, nxt_rbtree1_node_t *sentinel,
+    nxt_rbtree1_node_t *node);
+nxt_always_inline static inline void nxt_rbtree1_right_rotate(
+    nxt_rbtree1_node_t **root, nxt_rbtree1_node_t *sentinel,
+    nxt_rbtree1_node_t *node);
 
 
 void
@@ -322,7 +324,7 @@ nxt_rbtree1_delete(nxt_rbtree1_t *tree, nxt_rbtree1_node_t *node)
 }
 
 
-nxt_inline void
+static inline void
 nxt_rbtree1_left_rotate(nxt_rbtree1_node_t **root, nxt_rbtree1_node_t *sentinel,
     nxt_rbtree1_node_t *node)
 {
@@ -352,7 +354,7 @@ nxt_rbtree1_left_rotate(nxt_rbtree1_node_t **root, nxt_rbtree1_node_t *sentinel,
 }
 
 
-nxt_inline void
+static inline void
 nxt_rbtree1_right_rotate(nxt_rbtree1_node_t **root,
     nxt_rbtree1_node_t *sentinel, nxt_rbtree1_node_t *node)
 {
diff --git a/src/test/nxt_rbtree1_test.c b/src/test/nxt_rbtree1_test.c
index 1f23998..0e19a24 100644
--- a/src/test/nxt_rbtree1_test.c
+++ b/src/test/nxt_rbtree1_test.c
@@ -17,7 +17,8 @@
     ((node) != (tree)->sentinel)
 
 
-nxt_inline nxt_rbtree1_node_t *
+nxt_always_inline
+static inline nxt_rbtree1_node_t *
 nxt_rbtree1_node_successor(nxt_rbtree1_t *tree, nxt_rbtree1_node_t *node)
 {
     nxt_rbtree1_node_t  *parent;
@@ -187,7 +188,8 @@ nxt_rbtree1_test_insert_value(nxt_rbtree1_node_t *temp,
  * around some value as timeout values are.
  */
 
-nxt_inline nxt_int_t
+nxt_always_inline
+static inline nxt_int_t
 nxt_rbtree1_test_compare(nxt_rbtree1_node_t *node1, nxt_rbtree1_node_t *node2)
 {
     if (node1->key < node2->key) {
-- 
2.36.1



More information about the unit mailing list