From c38dfe6188112ca490090966a63faefe5ec7e9a0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 29 Aug 2022 13:01:02 +0000 Subject: added snes9x and php --- repo/php8/atomic-lsapi.patch | 82 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 repo/php8/atomic-lsapi.patch (limited to 'repo/php8/atomic-lsapi.patch') diff --git a/repo/php8/atomic-lsapi.patch b/repo/php8/atomic-lsapi.patch new file mode 100644 index 0000000..39cf182 --- /dev/null +++ b/repo/php8/atomic-lsapi.patch @@ -0,0 +1,82 @@ +Patch-Source: https://github.com/php/php-src/pull/7997 + +diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c +index 2208bbd47b..42dd320356 100644 +--- a/sapi/litespeed/lsapilib.c ++++ b/sapi/litespeed/lsapilib.c +@@ -443,7 +443,7 @@ static void lsapi_close_connection(LSAPI_Request *pReq) + if (s_busy_workers) + __sync_fetch_and_sub(s_busy_workers, 1); + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE); ++ __atomic_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE); + } + + +@@ -1587,7 +1587,7 @@ int LSAPI_Accept_r( LSAPI_Request * pReq ) + else + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_fetch_and_add(s_busy_workers, 1); +@@ -3315,7 +3315,7 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer, + if (pthread_atfork_func) + (*pthread_atfork_func)(NULL, NULL, set_skip_write); + +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_add_and_fetch(s_busy_workers, 1); +@@ -3402,7 +3402,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq) + if (pthread_atfork_func) + (*pthread_atfork_func)(NULL, NULL, set_skip_write); + +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_add_and_fetch(s_busy_workers, 1); +@@ -3651,7 +3651,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if (fd == pReq->m_fdListen) + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_ACCEPTING); + if (s_accepting_workers) + __sync_fetch_and_add(s_accepting_workers, 1); +@@ -3662,7 +3662,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if (s_accepting_workers) + __sync_fetch_and_sub(s_accepting_workers, 1); + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_IDLE); + } + +@@ -3711,7 +3711,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if ( pReq->m_fd != -1 ) + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_fetch_and_add(s_busy_workers, 1); +diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c +index 42dd320356..0932ebaaa8 100644 +--- a/sapi/litespeed/lsapilib.c ++++ b/sapi/litespeed/lsapilib.c +@@ -3390,7 +3390,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq) + { + int max_children = g_prefork_server->m_iMaxChildren; + s_pid = getpid(); +- __sync_lock_test_and_set(&pReq->child_status->m_pid, s_pid); ++ __atomic_test_and_set(&pReq->child_status->m_pid, s_pid); + s_worker_status = pReq->child_status; + + setsid(); -- cgit v1.2.1