summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_shmtx.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-10Core: fixed build on Tru64 UNIX.Sergey Kandaurov1-1/+1
There was a typo in NGX_EACCES. Reported by Goetz T. Fischer.
2015-02-04Core: fixed a race resulting in extra sem_post()'s.Roman Arutyunyan1-1/+2
The mtx->wait counter was not decremented if we were able to obtain the lock right after incrementing it. This resulted in unneeded sem_post() calls, eventually leading to EOVERFLOW errors being logged, "sem_post() failed while wake shmtx (75: Value too large for defined data type)". To close the race, mtx->wait is now decremented if we obtain the lock right after incrementing it in ngx_shmtx_lock(). The result can become -1 if a concurrent ngx_shmtx_unlock() decrements mtx->wait before the added code does. However, that only leads to one extra iteration in the next call of ngx_shmtx_lock().
2012-11-21Fixed location of debug message in ngx_shmtx_lock().Ruslan Ermilov1-3/+3
2012-07-03Fixed typo in a function name.Ruslan Ermilov1-3/+3
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-11-28Added (void) as we intentionally ignore returned values.Maxim Dounin1-1/+1
Requested by Igor Sysoev.
2011-11-23Fixed build without atomic operations.Maxim Dounin1-2/+2
2011-11-23Added shmtx interface to forcibly unlock mutexes.Maxim Dounin1-44/+69
It is currently used from master process on abnormal worker termination to unlock accept mutex (unlocking of accept mutex was broken in 1.0.2). It is expected to be used in the future to unlock other mutexes as well. Shared mutex code was rewritten to make this possible in a safe way, i.e. with a check if lock was actually held by the exited process. We again use pid to lock mutex, and use separate atomic variable for a count of processes waiting in sem_wait().
2011-05-10use POSIX semaphores in shmtx instead of sched_yield()Igor Sysoev1-0/+215
number of spinlock spins are increased twice
2007-02-11fix building on platforms with non-supported atomic operationsIgor Sysoev1-1/+2
2006-11-20slab allocator in shared memoryIgor Sysoev1-8/+5
2006-02-08nginx-0.3.27-RELEASE importrelease-0.3.27Igor Sysoev1-0/+70
*) Change: the "variables_hash_max_size" and "variables_hash_bucket_size" directives. *) Feature: the $body_bytes_sent variable can be used not only in the "log_format" directive. *) Feature: the $ssl_protocol and $ssl_cipher variables. *) Feature: the cache line size detection for widespread CPUs at start time. *) Feature: now the "accept_mutex" directive is supported using fcntl(2) on platforms different from i386, amd64, sparc64, and ppc. *) Feature: the "lock_file" directive and the --with-lock-path=PATH autoconfiguration directive. *) Bugfix: if the HTTPS protocol was used in the "proxy_pass" directive then the requests with the body was not transferred.