com php-src: Make tsrm_env_lock() void: TSRM/TSRM .c TSRM/TSRM.h

From: Date: Thu, 11 Apr 2019 08:40:54 +0000
Subject: com php-src: Make tsrm_env_lock() void: TSRM/TSRM .c TSRM/TSRM.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105632@lists.php.net to get a copy of this message
Commit: b213f13a2621ec553beec06d3e2f163c1e7e2282 Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 11 Apr 2019 10:40:54 +0200 Parents: d207c9a78a973d153dd17fd2d80b301d07fc9509 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b213f13a2621ec553beec06d3e2f163c1e7e2282 Log: Make tsrm_env_lock() void We're not checking the return value and the NTS version of this generates warnings. If we want to handle lock failures, we should do a hard abort inside tsrm_env_lock() itself. Changed paths: M TSRM/TSRM.c M TSRM/TSRM.h Diff: diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index d70c09d..34080ee 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -244,12 +244,12 @@ TSRM_API void tsrm_shutdown(void) /* {{{ */ /* environ lock api */ -TSRM_API int tsrm_env_lock() { - return tsrm_mutex_lock(tsrm_env_mutex); +TSRM_API void tsrm_env_lock() { + tsrm_mutex_lock(tsrm_env_mutex); } -TSRM_API int tsrm_env_unlock() { - return tsrm_mutex_unlock(tsrm_env_mutex); +TSRM_API void tsrm_env_unlock() { + tsrm_mutex_unlock(tsrm_env_mutex); } /* }}} */ /* enlarge the arrays for the already active threads */ diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 64661c1..89eea47 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -98,8 +98,8 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu TSRM_API void tsrm_shutdown(void); /* environ lock API */ -TSRM_API int tsrm_env_lock(); -TSRM_API int tsrm_env_unlock(); +TSRM_API void tsrm_env_lock(); +TSRM_API void tsrm_env_unlock(); /* allocates a new thread-safe-resource id */ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor); @@ -207,8 +207,8 @@ TSRM_API const char *tsrm_api_name(void); #else /* non ZTS */ -#define tsrm_env_lock() 0 -#define tsrm_env_unlock() 0 +#define tsrm_env_lock() +#define tsrm_env_unlock() #define TSRMLS_FETCH() #define TSRMLS_FETCH_FROM_CTX(ctx)

« previous php.cvs (#105632) next »