/[LeafOK_CVS]/lbbs/src/test_section_list.c
ViewVC logotype

Diff of /lbbs/src/test_section_list.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.40 by sysadm, Wed Nov 5 06:14:01 2025 UTC Revision 1.43 by sysadm, Tue Nov 18 15:15:18 2025 UTC
# Line 6  Line 6 
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7   */   */
8    
9    #ifdef HAVE_CONFIG_H
10    #include "config.h"
11    #endif
12    
13  #include "bbs.h"  #include "bbs.h"
14  #include "log.h"  #include "log.h"
15  #include "section_list.h"  #include "section_list.h"
# Line 943  int main(int argc, char *argv[]) Line 947  int main(int argc, char *argv[])
947                  }                  }
948          }          }
949    
950    #ifndef __CYGWIN__
951          printf("Try rw_lock for 5 sec...\n");          printf("Try rw_lock for 5 sec...\n");
952          if (section_list_try_rw_lock(NULL, 5) == 0)          if (section_list_try_rw_lock(NULL, 5) == 0)
953          {          {
954                  printf("section_list_try_rw_lock(sid = %d) error, expectation is timeout\n", p_section[i]->sid);                  printf("section_list_try_rw_lock(sid = %d) error, expectation is timeout\n", p_section[i]->sid);
955          }          }
956    #endif
957    
958          for (i = 0; i < section_count; i++)          for (i = 0; i < section_count; i++)
959          {          {
# Line 963  int main(int argc, char *argv[]) Line 969  int main(int argc, char *argv[])
969                  printf("section_list_rd_lock(sid = %d) error\n", p_section[i]->sid);                  printf("section_list_rd_lock(sid = %d) error\n", p_section[i]->sid);
970          }          }
971    
972    #ifndef __CYGWIN__
973          for (i = 0; i < section_count; i++)          for (i = 0; i < section_count; i++)
974          {          {
975                  if (section_list_try_rd_lock(p_section[i], 0) == 0)                  if (section_list_try_rd_lock(p_section[i], 0) == 0)
# Line 971  int main(int argc, char *argv[]) Line 978  int main(int argc, char *argv[])
978                          break;                          break;
979                  }                  }
980          }          }
981    #endif
982    
983          if (section_list_rw_unlock(NULL) < 0)          if (section_list_rw_unlock(NULL) < 0)
984          {          {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1