Diff for /freem/src/global_bltin.h between versions 1.7 and 1.9

version 1.7, 2025/04/08 21:41:13 version 1.9, 2025/04/09 14:34:30
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.9  2025/04/09 14:34:30  snw
    *   Further work on global_bltin.c refactor
    *
    *   Revision 1.8  2025/04/09 00:43:07  snw
    *   Exit with fatal error if a header mismatch found
    *
  *   Revision 1.7  2025/04/08 21:41:13  snw   *   Revision 1.7  2025/04/08 21:41:13  snw
  *   Make insert, update, and splitp global handler functions take a ptr to a global_handle instead of a file descriptor   *   Make insert, update, and splitp global handler functions take a ptr to a global_handle instead of a file descriptor
  *   *
Line 63  typedef struct global_header { Line 69  typedef struct global_header {
     char magic[5]; /* FRMGL */      char magic[5]; /* FRMGL */
     int format_version;      int format_version;
     char host_triplet[40];      char host_triplet[40];
       char host_id[256];
       
     unsigned long block_size;      unsigned long block_size;
     unsigned long last_transaction_id;      unsigned long last_transaction_id;
   
Line 77  typedef struct global_handle { Line 84  typedef struct global_handle {
     int fd; /* file descriptor */      int fd; /* file descriptor */
   
     global_header header;      global_header header;
     long use_count; /* how many times has it been accessed? */     
     long age;      long age;
     short opened;      short opened;
     short locked;      short locked;
     unsigned long last_block;      unsigned long last_block;
           
       unsigned long use_count; /* how many times has it been accessed? */
       unsigned long cache_misses;
       unsigned long cache_hits;
       
     short fast_path;      short fast_path;
           
     char global_name[256];      char global_name[256];
Line 94  typedef struct global_handle { Line 105  typedef struct global_handle {
 } global_handle;  } global_handle;
   
 extern global_handle *global_handles_head;  extern global_handle *global_handles_head;
   extern unsigned long gbl_cache_misses;
   extern unsigned long gbl_cache_hits;
   
 extern inline long gbl_path(char *key, char *buf);  extern inline long gbl_path(char *key, char *buf);
   extern void gbl_cache_hit(global_handle *g);
   extern void gbl_cache_miss(global_handle *g);
 extern int gbl_lock(global_handle *g, int type);  extern int gbl_lock(global_handle *g, int type);
 extern int gbl_unlock(global_handle *g);  extern int gbl_unlock(global_handle *g);
 extern void gbl_close(global_handle *g);  extern void gbl_close(global_handle *g);

Removed from v.1.7  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>