Line | Count | Source |
1 | | /* proto.h - The prototypes for the dbm routines. */ |
2 | | |
3 | | /* This file is part of GDBM, the GNU data base manager. |
4 | | Copyright (C) 1990-2025 Free Software Foundation, Inc. |
5 | | |
6 | | GDBM is free software; you can redistribute it and/or modify |
7 | | it under the terms of the GNU General Public License as published by |
8 | | the Free Software Foundation; either version 3, or (at your option) |
9 | | any later version. |
10 | | |
11 | | GDBM is distributed in the hope that it will be useful, |
12 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | | GNU General Public License for more details. |
15 | | |
16 | | You should have received a copy of the GNU General Public License |
17 | | along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ |
18 | | |
19 | | |
20 | | /* From bucket.c */ |
21 | | void _gdbm_new_bucket (GDBM_FILE, hash_bucket *, int); |
22 | | int _gdbm_get_bucket (GDBM_FILE, int); |
23 | | |
24 | | int _gdbm_split_bucket (GDBM_FILE, int); |
25 | | int _gdbm_write_bucket (GDBM_FILE, cache_elem *); |
26 | | int _gdbm_cache_init (GDBM_FILE, size_t); |
27 | | void _gdbm_cache_free (GDBM_FILE dbf); |
28 | | int _gdbm_cache_flush (GDBM_FILE dbf); |
29 | | |
30 | | /* Mark current bucket as changed. */ |
31 | | static inline void |
32 | | _gdbm_current_bucket_changed (GDBM_FILE dbf) |
33 | 320k | { |
34 | 320k | dbf->cache_mru->ca_changed = TRUE; |
35 | 320k | } Unexecuted instantiation: gdbm_fuzzer.c:_gdbm_current_bucket_changed Unexecuted instantiation: mem.c:_gdbm_current_bucket_changed Unexecuted instantiation: gram.c:_gdbm_current_bucket_changed Unexecuted instantiation: lex.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmshell.c:_gdbm_current_bucket_changed Unexecuted instantiation: var.c:_gdbm_current_bucket_changed Unexecuted instantiation: util.c:_gdbm_current_bucket_changed Unexecuted instantiation: pagerfile.c:_gdbm_current_bucket_changed Unexecuted instantiation: datconv.c:_gdbm_current_bucket_changed Unexecuted instantiation: input-file.c:_gdbm_current_bucket_changed Unexecuted instantiation: input-null.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmclose.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmcount.c:_gdbm_current_bucket_changed gdbmdelete.c:_gdbm_current_bucket_changed Line | Count | Source | 33 | 3.01k | { | 34 | 3.01k | dbf->cache_mru->ca_changed = TRUE; | 35 | 3.01k | } |
Unexecuted instantiation: gdbmdump.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmerrno.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmexp.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmfdesc.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmfetch.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmload.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmopen.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmimp.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmreorg.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmseq.c:_gdbm_current_bucket_changed Unexecuted instantiation: gdbmsetopt.c:_gdbm_current_bucket_changed gdbmstore.c:_gdbm_current_bucket_changed Line | Count | Source | 33 | 249k | { | 34 | 249k | dbf->cache_mru->ca_changed = TRUE; | 35 | 249k | } |
Unexecuted instantiation: gdbmsync.c:_gdbm_current_bucket_changed Unexecuted instantiation: avail.c:_gdbm_current_bucket_changed Unexecuted instantiation: base64.c:_gdbm_current_bucket_changed Unexecuted instantiation: bucket.c:_gdbm_current_bucket_changed falloc.c:_gdbm_current_bucket_changed Line | Count | Source | 33 | 67.8k | { | 34 | 67.8k | dbf->cache_mru->ca_changed = TRUE; | 35 | 67.8k | } |
Unexecuted instantiation: findkey.c:_gdbm_current_bucket_changed Unexecuted instantiation: fullio.c:_gdbm_current_bucket_changed Unexecuted instantiation: hash.c:_gdbm_current_bucket_changed Unexecuted instantiation: lock.c:_gdbm_current_bucket_changed Unexecuted instantiation: mmap.c:_gdbm_current_bucket_changed Unexecuted instantiation: recover.c:_gdbm_current_bucket_changed Unexecuted instantiation: update.c:_gdbm_current_bucket_changed Unexecuted instantiation: debug.c:_gdbm_current_bucket_changed |
36 | | |
37 | | /* Return true if the directory entry at DIR_INDEX can be considered |
38 | | valid. This means that DIR_INDEX is in the valid range for addressing |
39 | | the dir array, and the offset stored in dir[DIR_INDEX] points past |
40 | | first two blocks in file. This does not necessarily mean that there's |
41 | | a valid bucket or data block at that offset. All this implies is that |
42 | | it is safe to use the offset for look up in the bucket cache and to |
43 | | attempt to read a block at that offset. */ |
44 | | static inline int |
45 | | gdbm_dir_entry_valid_p (GDBM_FILE dbf, int dir_index) |
46 | 3.89M | { |
47 | 3.89M | return dir_index >= 0 |
48 | 3.89M | && dir_index < GDBM_DIR_COUNT (dbf) |
49 | 3.89M | && dbf->dir[dir_index] >= dbf->header->block_size; |
50 | 3.89M | } Unexecuted instantiation: gdbm_fuzzer.c:gdbm_dir_entry_valid_p Unexecuted instantiation: mem.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gram.c:gdbm_dir_entry_valid_p Unexecuted instantiation: lex.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmshell.c:gdbm_dir_entry_valid_p Unexecuted instantiation: var.c:gdbm_dir_entry_valid_p Unexecuted instantiation: util.c:gdbm_dir_entry_valid_p Unexecuted instantiation: pagerfile.c:gdbm_dir_entry_valid_p Unexecuted instantiation: datconv.c:gdbm_dir_entry_valid_p Unexecuted instantiation: input-file.c:gdbm_dir_entry_valid_p Unexecuted instantiation: input-null.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmclose.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmcount.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmdelete.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmdump.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmerrno.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmexp.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmfdesc.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmfetch.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmload.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmopen.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmimp.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmreorg.c:gdbm_dir_entry_valid_p gdbmseq.c:gdbm_dir_entry_valid_p Line | Count | Source | 46 | 187 | { | 47 | 187 | return dir_index >= 0 | 48 | 187 | && dir_index < GDBM_DIR_COUNT (dbf) | 49 | 185 | && dbf->dir[dir_index] >= dbf->header->block_size; | 50 | 187 | } |
Unexecuted instantiation: gdbmsetopt.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmstore.c:gdbm_dir_entry_valid_p Unexecuted instantiation: gdbmsync.c:gdbm_dir_entry_valid_p Unexecuted instantiation: avail.c:gdbm_dir_entry_valid_p Unexecuted instantiation: base64.c:gdbm_dir_entry_valid_p bucket.c:gdbm_dir_entry_valid_p Line | Count | Source | 46 | 3.89M | { | 47 | 3.89M | return dir_index >= 0 | 48 | 3.89M | && dir_index < GDBM_DIR_COUNT (dbf) | 49 | 3.89M | && dbf->dir[dir_index] >= dbf->header->block_size; | 50 | 3.89M | } |
Unexecuted instantiation: falloc.c:gdbm_dir_entry_valid_p Unexecuted instantiation: findkey.c:gdbm_dir_entry_valid_p Unexecuted instantiation: fullio.c:gdbm_dir_entry_valid_p Unexecuted instantiation: hash.c:gdbm_dir_entry_valid_p Unexecuted instantiation: lock.c:gdbm_dir_entry_valid_p Unexecuted instantiation: mmap.c:gdbm_dir_entry_valid_p Unexecuted instantiation: recover.c:gdbm_dir_entry_valid_p Unexecuted instantiation: update.c:gdbm_dir_entry_valid_p Unexecuted instantiation: debug.c:gdbm_dir_entry_valid_p |
51 | | |
52 | | |
53 | | /* From falloc.c */ |
54 | | off_t _gdbm_alloc (GDBM_FILE, int); |
55 | | int _gdbm_free (GDBM_FILE, off_t, int); |
56 | | void _gdbm_put_av_elem (avail_elem, avail_elem [], int *, int); |
57 | | int _gdbm_avail_block_read (GDBM_FILE dbf, avail_block *avblk, size_t size); |
58 | | |
59 | | /* From findkey.c */ |
60 | | char *_gdbm_read_entry (GDBM_FILE, int); |
61 | | int _gdbm_findkey (GDBM_FILE, datum, char **, int *); |
62 | | |
63 | | /* From hash.c */ |
64 | | int _gdbm_hash (datum); |
65 | | void _gdbm_hash_key (GDBM_FILE dbf, datum key, int *hash, int *bucket, |
66 | | int *offset); |
67 | | int _gdbm_bucket_dir (GDBM_FILE dbf, int hash); |
68 | | |
69 | | /* From update.c */ |
70 | | int _gdbm_end_update (GDBM_FILE); |
71 | | void _gdbm_fatal (GDBM_FILE, const char *); |
72 | | |
73 | | /* From gdbmopen.c */ |
74 | | int _gdbm_validate_header (GDBM_FILE dbf); |
75 | | |
76 | | int _gdbm_file_size (GDBM_FILE dbf, off_t *psize); |
77 | | |
78 | | /* From gdbmload.c */ |
79 | | int _gdbm_str2fmt (char const *str); |
80 | | |
81 | | /* From mmap.c */ |
82 | | int _gdbm_mapped_init (GDBM_FILE); |
83 | | void _gdbm_mapped_unmap (GDBM_FILE); |
84 | | ssize_t _gdbm_mapped_read (GDBM_FILE, void *, size_t); |
85 | | ssize_t _gdbm_mapped_write (GDBM_FILE, void *, size_t); |
86 | | off_t _gdbm_mapped_lseek (GDBM_FILE, off_t, int); |
87 | | int _gdbm_mapped_sync (GDBM_FILE); |
88 | | |
89 | | /* From lock.c */ |
90 | | void _gdbm_unlock_file (GDBM_FILE); |
91 | | int _gdbm_lock_file (GDBM_FILE, int); |
92 | | int _gdbm_lock_file_wait (GDBM_FILE, struct gdbm_open_spec const *); |
93 | | |
94 | | /* From fullio.c */ |
95 | | int _gdbm_full_read (GDBM_FILE, void *, size_t); |
96 | | int _gdbm_full_write (GDBM_FILE, void *, size_t); |
97 | | int _gdbm_file_extend (GDBM_FILE dbf, off_t size); |
98 | | |
99 | | /* From base64.c */ |
100 | | int _gdbm_base64_encode (const unsigned char *input, size_t input_len, |
101 | | unsigned char **output, size_t *output_size, |
102 | | size_t *outbytes); |
103 | | int _gdbm_base64_decode (const unsigned char *input, size_t input_len, |
104 | | unsigned char **output, size_t *output_size, |
105 | | size_t *inbytes, size_t *outbytes); |
106 | | |
107 | | int _gdbm_load (FILE *fp, GDBM_FILE *pdbf, unsigned long *line); |
108 | | int _gdbm_dump (GDBM_FILE dbf, FILE *fp); |
109 | | |
110 | | /* From recover.c */ |
111 | | int _gdbm_next_bucket_dir (GDBM_FILE dbf, int bucket_dir); |
112 | | |
113 | | |
114 | | /* avail.c */ |
115 | | int gdbm_avail_block_validate (GDBM_FILE dbf, avail_block *avblk, size_t size); |
116 | | int gdbm_bucket_avail_table_validate (GDBM_FILE dbf, hash_bucket *bucket); |
117 | | int gdbm_avail_traverse (GDBM_FILE dbf, |
118 | | int (*cb) (avail_block *, off_t, void *), |
119 | | void *data); |
120 | | |
121 | | |
122 | | /* I/O functions */ |
123 | | static inline ssize_t |
124 | | gdbm_file_read (GDBM_FILE dbf, void *buf, size_t size) |
125 | 1.42M | { |
126 | 1.42M | #if HAVE_MMAP |
127 | 1.42M | return _gdbm_mapped_read (dbf, buf, size); |
128 | | #else |
129 | | return read (dbf->desc, buf, size); |
130 | | #endif |
131 | 1.42M | } Unexecuted instantiation: gdbm_fuzzer.c:gdbm_file_read Unexecuted instantiation: mem.c:gdbm_file_read Unexecuted instantiation: gram.c:gdbm_file_read Unexecuted instantiation: lex.c:gdbm_file_read Unexecuted instantiation: gdbmshell.c:gdbm_file_read Unexecuted instantiation: var.c:gdbm_file_read Unexecuted instantiation: util.c:gdbm_file_read Unexecuted instantiation: pagerfile.c:gdbm_file_read Unexecuted instantiation: datconv.c:gdbm_file_read Unexecuted instantiation: input-file.c:gdbm_file_read Unexecuted instantiation: input-null.c:gdbm_file_read Unexecuted instantiation: gdbmclose.c:gdbm_file_read Unexecuted instantiation: gdbmcount.c:gdbm_file_read Unexecuted instantiation: gdbmdelete.c:gdbm_file_read Unexecuted instantiation: gdbmdump.c:gdbm_file_read Unexecuted instantiation: gdbmerrno.c:gdbm_file_read Unexecuted instantiation: gdbmexp.c:gdbm_file_read Unexecuted instantiation: gdbmfdesc.c:gdbm_file_read Unexecuted instantiation: gdbmfetch.c:gdbm_file_read Unexecuted instantiation: gdbmload.c:gdbm_file_read Unexecuted instantiation: gdbmopen.c:gdbm_file_read Unexecuted instantiation: gdbmimp.c:gdbm_file_read Unexecuted instantiation: gdbmreorg.c:gdbm_file_read Unexecuted instantiation: gdbmseq.c:gdbm_file_read Unexecuted instantiation: gdbmsetopt.c:gdbm_file_read Unexecuted instantiation: gdbmstore.c:gdbm_file_read Unexecuted instantiation: gdbmsync.c:gdbm_file_read Unexecuted instantiation: avail.c:gdbm_file_read Unexecuted instantiation: base64.c:gdbm_file_read Unexecuted instantiation: bucket.c:gdbm_file_read Unexecuted instantiation: falloc.c:gdbm_file_read Unexecuted instantiation: findkey.c:gdbm_file_read Line | Count | Source | 125 | 1.42M | { | 126 | 1.42M | #if HAVE_MMAP | 127 | 1.42M | return _gdbm_mapped_read (dbf, buf, size); | 128 | | #else | 129 | | return read (dbf->desc, buf, size); | 130 | | #endif | 131 | 1.42M | } |
Unexecuted instantiation: hash.c:gdbm_file_read Unexecuted instantiation: lock.c:gdbm_file_read Unexecuted instantiation: mmap.c:gdbm_file_read Unexecuted instantiation: recover.c:gdbm_file_read Unexecuted instantiation: update.c:gdbm_file_read Unexecuted instantiation: debug.c:gdbm_file_read |
132 | | |
133 | | static inline ssize_t |
134 | | gdbm_file_write (GDBM_FILE dbf, void *buf, size_t size) |
135 | 682k | { |
136 | 682k | #if HAVE_MMAP |
137 | 682k | return _gdbm_mapped_write (dbf, buf, size); |
138 | | #else |
139 | | return write (dbf->desc, buf, size); |
140 | | #endif |
141 | 682k | } Unexecuted instantiation: gdbm_fuzzer.c:gdbm_file_write Unexecuted instantiation: mem.c:gdbm_file_write Unexecuted instantiation: gram.c:gdbm_file_write Unexecuted instantiation: lex.c:gdbm_file_write Unexecuted instantiation: gdbmshell.c:gdbm_file_write Unexecuted instantiation: var.c:gdbm_file_write Unexecuted instantiation: util.c:gdbm_file_write Unexecuted instantiation: pagerfile.c:gdbm_file_write Unexecuted instantiation: datconv.c:gdbm_file_write Unexecuted instantiation: input-file.c:gdbm_file_write Unexecuted instantiation: input-null.c:gdbm_file_write Unexecuted instantiation: gdbmclose.c:gdbm_file_write Unexecuted instantiation: gdbmcount.c:gdbm_file_write Unexecuted instantiation: gdbmdelete.c:gdbm_file_write Unexecuted instantiation: gdbmdump.c:gdbm_file_write Unexecuted instantiation: gdbmerrno.c:gdbm_file_write Unexecuted instantiation: gdbmexp.c:gdbm_file_write Unexecuted instantiation: gdbmfdesc.c:gdbm_file_write Unexecuted instantiation: gdbmfetch.c:gdbm_file_write Unexecuted instantiation: gdbmload.c:gdbm_file_write Unexecuted instantiation: gdbmopen.c:gdbm_file_write Unexecuted instantiation: gdbmimp.c:gdbm_file_write Unexecuted instantiation: gdbmreorg.c:gdbm_file_write Unexecuted instantiation: gdbmseq.c:gdbm_file_write Unexecuted instantiation: gdbmsetopt.c:gdbm_file_write Unexecuted instantiation: gdbmstore.c:gdbm_file_write Unexecuted instantiation: gdbmsync.c:gdbm_file_write Unexecuted instantiation: avail.c:gdbm_file_write Unexecuted instantiation: base64.c:gdbm_file_write Unexecuted instantiation: bucket.c:gdbm_file_write Unexecuted instantiation: falloc.c:gdbm_file_write Unexecuted instantiation: findkey.c:gdbm_file_write Line | Count | Source | 135 | 682k | { | 136 | 682k | #if HAVE_MMAP | 137 | 682k | return _gdbm_mapped_write (dbf, buf, size); | 138 | | #else | 139 | | return write (dbf->desc, buf, size); | 140 | | #endif | 141 | 682k | } |
Unexecuted instantiation: hash.c:gdbm_file_write Unexecuted instantiation: lock.c:gdbm_file_write Unexecuted instantiation: mmap.c:gdbm_file_write Unexecuted instantiation: recover.c:gdbm_file_write Unexecuted instantiation: update.c:gdbm_file_write Unexecuted instantiation: debug.c:gdbm_file_write |
142 | | |
143 | | static inline off_t |
144 | | gdbm_file_seek (GDBM_FILE dbf, off_t off, int whence) |
145 | 4.89M | { |
146 | 4.89M | #if HAVE_MMAP |
147 | 4.89M | return _gdbm_mapped_lseek (dbf, off, whence); |
148 | | #else |
149 | | return lseek (dbf->desc, off, whence); |
150 | | #endif |
151 | 4.89M | } Unexecuted instantiation: gdbm_fuzzer.c:gdbm_file_seek Unexecuted instantiation: mem.c:gdbm_file_seek Unexecuted instantiation: gram.c:gdbm_file_seek Unexecuted instantiation: lex.c:gdbm_file_seek Unexecuted instantiation: gdbmshell.c:gdbm_file_seek Unexecuted instantiation: var.c:gdbm_file_seek Unexecuted instantiation: util.c:gdbm_file_seek Unexecuted instantiation: pagerfile.c:gdbm_file_seek Unexecuted instantiation: datconv.c:gdbm_file_seek Unexecuted instantiation: input-file.c:gdbm_file_seek Unexecuted instantiation: input-null.c:gdbm_file_seek Unexecuted instantiation: gdbmclose.c:gdbm_file_seek Unexecuted instantiation: gdbmcount.c:gdbm_file_seek Unexecuted instantiation: gdbmdelete.c:gdbm_file_seek Unexecuted instantiation: gdbmdump.c:gdbm_file_seek Unexecuted instantiation: gdbmerrno.c:gdbm_file_seek Unexecuted instantiation: gdbmexp.c:gdbm_file_seek Unexecuted instantiation: gdbmfdesc.c:gdbm_file_seek Unexecuted instantiation: gdbmfetch.c:gdbm_file_seek Unexecuted instantiation: gdbmload.c:gdbm_file_seek gdbmopen.c:gdbm_file_seek Line | Count | Source | 145 | 2.83k | { | 146 | 2.83k | #if HAVE_MMAP | 147 | 2.83k | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 2.83k | } |
Unexecuted instantiation: gdbmimp.c:gdbm_file_seek Unexecuted instantiation: gdbmreorg.c:gdbm_file_seek Unexecuted instantiation: gdbmseq.c:gdbm_file_seek Unexecuted instantiation: gdbmsetopt.c:gdbm_file_seek gdbmstore.c:gdbm_file_seek Line | Count | Source | 145 | 249k | { | 146 | 249k | #if HAVE_MMAP | 147 | 249k | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 249k | } |
Unexecuted instantiation: gdbmsync.c:gdbm_file_seek Line | Count | Source | 145 | 2.58k | { | 146 | 2.58k | #if HAVE_MMAP | 147 | 2.58k | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 2.58k | } |
Unexecuted instantiation: base64.c:gdbm_file_seek Line | Count | Source | 145 | 428k | { | 146 | 428k | #if HAVE_MMAP | 147 | 428k | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 428k | } |
Line | Count | Source | 145 | 302 | { | 146 | 302 | #if HAVE_MMAP | 147 | 302 | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 302 | } |
Line | Count | Source | 145 | 4.09M | { | 146 | 4.09M | #if HAVE_MMAP | 147 | 4.09M | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 4.09M | } |
Unexecuted instantiation: fullio.c:gdbm_file_seek Unexecuted instantiation: hash.c:gdbm_file_seek Unexecuted instantiation: lock.c:gdbm_file_seek Unexecuted instantiation: mmap.c:gdbm_file_seek Unexecuted instantiation: recover.c:gdbm_file_seek Line | Count | Source | 145 | 121k | { | 146 | 121k | #if HAVE_MMAP | 147 | 121k | return _gdbm_mapped_lseek (dbf, off, whence); | 148 | | #else | 149 | | return lseek (dbf->desc, off, whence); | 150 | | #endif | 151 | 121k | } |
Unexecuted instantiation: debug.c:gdbm_file_seek |
152 | | |
153 | | /* From gdbmsync.c */ |
154 | | int gdbm_file_sync (GDBM_FILE dbf); |
155 | | #ifdef GDBM_FAILURE_ATOMIC |
156 | | extern int _gdbm_snapshot(GDBM_FILE); |
157 | | #endif /* GDBM_FAILURE_ATOMIC */ |
158 | | |
159 | | static inline void |
160 | | _gdbmsync_init (GDBM_FILE dbf) |
161 | 9.32k | { |
162 | 9.32k | #ifdef GDBM_FAILURE_ATOMIC |
163 | 9.32k | dbf->snapfd[0] = dbf->snapfd[1] = -1; |
164 | 9.32k | dbf->eo = 0; |
165 | 9.32k | #endif |
166 | 9.32k | } Unexecuted instantiation: gdbm_fuzzer.c:_gdbmsync_init Unexecuted instantiation: mem.c:_gdbmsync_init Unexecuted instantiation: gram.c:_gdbmsync_init Unexecuted instantiation: lex.c:_gdbmsync_init Unexecuted instantiation: gdbmshell.c:_gdbmsync_init Unexecuted instantiation: var.c:_gdbmsync_init Unexecuted instantiation: util.c:_gdbmsync_init Unexecuted instantiation: pagerfile.c:_gdbmsync_init Unexecuted instantiation: datconv.c:_gdbmsync_init Unexecuted instantiation: input-file.c:_gdbmsync_init Unexecuted instantiation: input-null.c:_gdbmsync_init Unexecuted instantiation: gdbmclose.c:_gdbmsync_init Unexecuted instantiation: gdbmcount.c:_gdbmsync_init Unexecuted instantiation: gdbmdelete.c:_gdbmsync_init Unexecuted instantiation: gdbmdump.c:_gdbmsync_init Unexecuted instantiation: gdbmerrno.c:_gdbmsync_init Unexecuted instantiation: gdbmexp.c:_gdbmsync_init Unexecuted instantiation: gdbmfdesc.c:_gdbmsync_init Unexecuted instantiation: gdbmfetch.c:_gdbmsync_init Unexecuted instantiation: gdbmload.c:_gdbmsync_init gdbmopen.c:_gdbmsync_init Line | Count | Source | 161 | 9.32k | { | 162 | 9.32k | #ifdef GDBM_FAILURE_ATOMIC | 163 | 9.32k | dbf->snapfd[0] = dbf->snapfd[1] = -1; | 164 | 9.32k | dbf->eo = 0; | 165 | 9.32k | #endif | 166 | 9.32k | } |
Unexecuted instantiation: gdbmimp.c:_gdbmsync_init Unexecuted instantiation: gdbmreorg.c:_gdbmsync_init Unexecuted instantiation: gdbmseq.c:_gdbmsync_init Unexecuted instantiation: gdbmsetopt.c:_gdbmsync_init Unexecuted instantiation: gdbmstore.c:_gdbmsync_init Unexecuted instantiation: gdbmsync.c:_gdbmsync_init Unexecuted instantiation: avail.c:_gdbmsync_init Unexecuted instantiation: base64.c:_gdbmsync_init Unexecuted instantiation: bucket.c:_gdbmsync_init Unexecuted instantiation: falloc.c:_gdbmsync_init Unexecuted instantiation: findkey.c:_gdbmsync_init Unexecuted instantiation: fullio.c:_gdbmsync_init Unexecuted instantiation: hash.c:_gdbmsync_init Unexecuted instantiation: lock.c:_gdbmsync_init Unexecuted instantiation: mmap.c:_gdbmsync_init Unexecuted instantiation: recover.c:_gdbmsync_init Unexecuted instantiation: update.c:_gdbmsync_init Unexecuted instantiation: debug.c:_gdbmsync_init |
167 | | |
168 | | static inline void |
169 | | _gdbmsync_done (GDBM_FILE dbf) |
170 | 3.66k | { |
171 | 3.66k | #ifdef GDBM_FAILURE_ATOMIC |
172 | 3.66k | if (dbf->snapfd[0] >= 0) |
173 | 0 | close (dbf->snapfd[0]); |
174 | 3.66k | if (dbf->snapfd[1] >= 0) |
175 | 0 | close (dbf->snapfd[1]); |
176 | 3.66k | #endif |
177 | 3.66k | } Unexecuted instantiation: gdbm_fuzzer.c:_gdbmsync_done Unexecuted instantiation: mem.c:_gdbmsync_done Unexecuted instantiation: gram.c:_gdbmsync_done Unexecuted instantiation: lex.c:_gdbmsync_done Unexecuted instantiation: gdbmshell.c:_gdbmsync_done Unexecuted instantiation: var.c:_gdbmsync_done Unexecuted instantiation: util.c:_gdbmsync_done Unexecuted instantiation: pagerfile.c:_gdbmsync_done Unexecuted instantiation: datconv.c:_gdbmsync_done Unexecuted instantiation: input-file.c:_gdbmsync_done Unexecuted instantiation: input-null.c:_gdbmsync_done gdbmclose.c:_gdbmsync_done Line | Count | Source | 170 | 3.66k | { | 171 | 3.66k | #ifdef GDBM_FAILURE_ATOMIC | 172 | 3.66k | if (dbf->snapfd[0] >= 0) | 173 | 0 | close (dbf->snapfd[0]); | 174 | 3.66k | if (dbf->snapfd[1] >= 0) | 175 | 0 | close (dbf->snapfd[1]); | 176 | 3.66k | #endif | 177 | 3.66k | } |
Unexecuted instantiation: gdbmcount.c:_gdbmsync_done Unexecuted instantiation: gdbmdelete.c:_gdbmsync_done Unexecuted instantiation: gdbmdump.c:_gdbmsync_done Unexecuted instantiation: gdbmerrno.c:_gdbmsync_done Unexecuted instantiation: gdbmexp.c:_gdbmsync_done Unexecuted instantiation: gdbmfdesc.c:_gdbmsync_done Unexecuted instantiation: gdbmfetch.c:_gdbmsync_done Unexecuted instantiation: gdbmload.c:_gdbmsync_done Unexecuted instantiation: gdbmopen.c:_gdbmsync_done Unexecuted instantiation: gdbmimp.c:_gdbmsync_done Unexecuted instantiation: gdbmreorg.c:_gdbmsync_done Unexecuted instantiation: gdbmseq.c:_gdbmsync_done Unexecuted instantiation: gdbmsetopt.c:_gdbmsync_done Unexecuted instantiation: gdbmstore.c:_gdbmsync_done Unexecuted instantiation: gdbmsync.c:_gdbmsync_done Unexecuted instantiation: avail.c:_gdbmsync_done Unexecuted instantiation: base64.c:_gdbmsync_done Unexecuted instantiation: bucket.c:_gdbmsync_done Unexecuted instantiation: falloc.c:_gdbmsync_done Unexecuted instantiation: findkey.c:_gdbmsync_done Unexecuted instantiation: fullio.c:_gdbmsync_done Unexecuted instantiation: hash.c:_gdbmsync_done Unexecuted instantiation: lock.c:_gdbmsync_done Unexecuted instantiation: mmap.c:_gdbmsync_done Unexecuted instantiation: recover.c:_gdbmsync_done Unexecuted instantiation: update.c:_gdbmsync_done Unexecuted instantiation: debug.c:_gdbmsync_done |
178 | | |