apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apr/locks/unix locks.c
Date Fri, 01 Dec 2000 14:00:55 GMT
trawick     00/12/01 06:00:55

  Modified:    .        configure.in hints.m4 CHANGES
               include  apr.h.in apr.hw
               locks/unix locks.c
  Log:
  New config variable apr_process_lock_is_global specifies that the selected
  inter-process lock method is sufficient for APR_LOCKALL (i.e., it blocks
  all threads and processes).  For now, hints.m4 turns on this flag for
  OS/390.
  
  Revision  Changes    Path
  1.178     +11 -0     apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.177
  retrieving revision 1.178
  diff -u -r1.177 -r1.178
  --- configure.in	2000/11/30 22:17:58	1.177
  +++ configure.in	2000/12/01 14:00:53	1.178
  @@ -668,6 +668,17 @@
   AC_SUBST(procpthreadser)
   AC_SUBST(pthreadser)
   
  +AC_MSG_CHECKING(if interprocess lock affects threads)
  +if test "x$apr_process_lock_is_global" = "xyes"; then
  +    proclockglobal="1"
  +    AC_MSG_RESULT(yes)
  +else
  +    proclockglobal="0"
  +    AC_MSG_RESULT(no)
  +fi
  +
  +AC_SUBST(proclockglobal)
  +
   dnl #----------------------------- Checking for /dev/random 
   AC_MSG_CHECKING(for /dev/random)
   
  
  
  
  1.28      +1 -0      apr/hints.m4
  
  Index: hints.m4
  ===================================================================
  RCS file: /home/cvs/apr/hints.m4,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- hints.m4	2000/11/30 22:17:58	1.27
  +++ hints.m4	2000/12/01 14:00:53	1.28
  @@ -348,6 +348,7 @@
   	;;
       *-ibm-os390)
          APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
  +       APR_SETIFNULL(apr_process_lock_is_global, [yes])
          APR_SETIFNULL(CC, [cc])
          APR_ADDTO(CFLAGS, [-U_NO_PROTO])
          APR_ADDTO(CFLAGS, [-DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR])
  
  
  
  1.10      +5 -1      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CHANGES	2000/12/01 07:23:23	1.9
  +++ CHANGES	2000/12/01 14:00:53	1.10
  @@ -9,7 +9,11 @@
        sempaphore functions, not by the presence of union semun.  New
        config variable apr_lock_method can override autodetection of the 
        apr_lock implementation method.  For now, hints.m4 uses it to select 
  -     SysV semaphores for OS/390.  [Jeff Trawick]
  +     SysV semaphores for OS/390.  New config variable 
  +     apr_process_lock_is_global specifies that the selected inter-process
  +     lock method is sufficient for APR_LOCKALL (i.e., it blocks all
  +     threads and processes).  For now, hints.m4 turns on this flag for
  +     OS/390.  [Jeff Trawick]
        
     *) Get APR_OFF_T_FMT defined properly on Solaris Sparc.
        [Jeff Trawick]
  
  
  
  1.52      +2 -0      apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.h.in,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- apr.h.in	2000/11/13 03:18:19	1.51
  +++ apr.h.in	2000/12/01 14:00:54	1.52
  @@ -44,6 +44,8 @@
   #define APR_USE_PROC_PTHREAD_SERIALIZE    @procpthreadser@ 
   #define APR_USE_PTHREAD_SERIALIZE         @pthreadser@ 
   
  +#define APR_PROCESS_LOCK_IS_GLOBAL        @proclockglobal@
  +
   #define APR_USES_ANONYMOUS_SHM            @anonymous_shm@
   #define APR_USES_FILEBASED_SHM            @filebased_shm@
   #define APR_USES_KEYBASED_SHM             @keybased_shm@
  
  
  
  1.37      +2 -0      apr/include/apr.hw
  
  Index: apr.hw
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.hw,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- apr.hw	2000/11/13 03:18:19	1.36
  +++ apr.hw	2000/12/01 14:00:54	1.37
  @@ -139,6 +139,8 @@
   #define APR_USE_PROC_PTHREAD_SERIALIZE    0 
   #define APR_USE_PTHREAD_SERIALIZE         0 
   
  +#define APR_PROCESS_LOCK_IS_GLOBAL        0
  +
   #define NO_USE_SIGACTION
   
   #if APR_HAVE_SYS_TYPES_H
  
  
  
  1.42      +16 -0     apr/locks/unix/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/locks.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- locks.c	2000/11/09 06:25:29	1.41
  +++ locks.c	2000/12/01 14:00:55	1.42
  @@ -77,7 +77,11 @@
       }
   #endif
   
  +#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
  +    if (scope == APR_INTRAPROCESS) {
  +#else
       if (scope != APR_CROSS_PROCESS) {
  +#endif
   #if APR_HAS_THREADS
           if ((stat = apr_unix_create_intra_lock(new)) != APR_SUCCESS) {
               return stat;
  @@ -100,7 +104,11 @@
   apr_status_t apr_lock(apr_lock_t *lock)
   {
       apr_status_t stat;
  +#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
  +    if (lock->scope == APR_INTRAPROCESS) {
  +#else
       if (lock->scope != APR_CROSS_PROCESS) {
  +#endif
   #if APR_HAS_THREADS
           if ((stat = apr_unix_lock_intra(lock)) != APR_SUCCESS) {
               return stat;
  @@ -121,7 +129,11 @@
   {
       apr_status_t stat;
   
  +#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
  +    if (lock->scope == APR_INTRAPROCESS) {
  +#else
       if (lock->scope != APR_CROSS_PROCESS) {
  +#endif
   #if APR_HAS_THREADS
           if ((stat = apr_unix_unlock_intra(lock)) != APR_SUCCESS) {
               return stat;
  @@ -141,7 +153,11 @@
   apr_status_t apr_destroy_lock(apr_lock_t *lock)
   {
       apr_status_t stat;
  +#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
  +    if (lock->scope == APR_INTRAPROCESS) {
  +#else
       if (lock->scope != APR_CROSS_PROCESS) {
  +#endif
   #if APR_HAS_THREADS
           if ((stat = apr_unix_destroy_intra_lock(lock)) != APR_SUCCESS) {
               return stat;
  
  
  

Mime
View raw message