@@ -482,7 +482,11 @@ static inline void accel_restart_enter(TSRMLS_D)
482
482
#ifdef ZEND_WIN32
483
483
INCREMENT (restart_in );
484
484
#else
485
+ # ifdef _AIX
486
+ static FLOCK_STRUCTURE (restart_in_progress , F_WRLCK , SEEK_SET , 2 , 1 ) ;
487
+ # else
485
488
static const FLOCK_STRUCTURE (restart_in_progress , F_WRLCK , SEEK_SET , 2 , 1 ) ;
489
+ #endif
486
490
487
491
if (fcntl (lock_file , F_SETLK , & restart_in_progress ) == -1 ) {
488
492
zend_accel_error (ACCEL_LOG_DEBUG , "RestartC(+1): %s (%d)" , strerror (errno ), errno );
@@ -497,7 +501,11 @@ static inline void accel_restart_leave(TSRMLS_D)
497
501
ZCSG (restart_in_progress ) = 0 ;
498
502
DECREMENT (restart_in );
499
503
#else
504
+ # ifdef _AIX
505
+ static FLOCK_STRUCTURE (restart_finished , F_UNLCK , SEEK_SET , 2 , 1 ) ;
506
+ # else
500
507
static const FLOCK_STRUCTURE (restart_finished , F_UNLCK , SEEK_SET , 2 , 1 ) ;
508
+ # endif
501
509
502
510
ZCSG (restart_in_progress ) = 0 ;
503
511
if (fcntl (lock_file , F_SETLK , & restart_finished ) == -1 ) {
@@ -535,7 +543,11 @@ static inline void accel_activate_add(TSRMLS_D)
535
543
#ifdef ZEND_WIN32
536
544
INCREMENT (mem_usage );
537
545
#else
546
+ # ifdef _AIX
547
+ static FLOCK_STRUCTURE (mem_usage_lock , F_RDLCK , SEEK_SET , 1 , 1 ) ;
548
+ # else
538
549
static const FLOCK_STRUCTURE (mem_usage_lock , F_RDLCK , SEEK_SET , 1 , 1 ) ;
550
+ # endif
539
551
540
552
if (fcntl (lock_file , F_SETLK , & mem_usage_lock ) == -1 ) {
541
553
zend_accel_error (ACCEL_LOG_DEBUG , "UpdateC(+1): %s (%d)" , strerror (errno ), errno );
@@ -552,7 +564,11 @@ static inline void accel_deactivate_sub(TSRMLS_D)
552
564
ZCG (counted ) = 0 ;
553
565
}
554
566
#else
567
+ # ifdef _AIX
568
+ static FLOCK_STRUCTURE (mem_usage_unlock , F_UNLCK , SEEK_SET , 1 , 1 ) ;
569
+ # else
555
570
static const FLOCK_STRUCTURE (mem_usage_unlock , F_UNLCK , SEEK_SET , 1 , 1 ) ;
571
+ # endif
556
572
557
573
if (fcntl (lock_file , F_SETLK , & mem_usage_unlock ) == -1 ) {
558
574
zend_accel_error (ACCEL_LOG_DEBUG , "UpdateC(-1): %s (%d)" , strerror (errno ), errno );
@@ -565,7 +581,11 @@ static inline void accel_unlock_all(TSRMLS_D)
565
581
#ifdef ZEND_WIN32
566
582
accel_deactivate_sub (TSRMLS_C );
567
583
#else
584
+ # ifdef _AIX
585
+ static FLOCK_STRUCTURE (mem_usage_unlock_all , F_UNLCK , SEEK_SET , 0 , 0 ) ;
586
+ # else
568
587
static const FLOCK_STRUCTURE (mem_usage_unlock_all , F_UNLCK , SEEK_SET , 0 , 0 ) ;
588
+ # endif
569
589
570
590
if (fcntl (lock_file , F_SETLK , & mem_usage_unlock_all ) == -1 ) {
571
591
zend_accel_error (ACCEL_LOG_DEBUG , "UnlockAll: %s (%d)" , strerror (errno ), errno );
0 commit comments