PennMUSH Community

root/1.8.3/trunk/hdrs/chunk.h

Revision 919, 1.1 kB (checked in by shawnw, 1 year ago)

1.8.3p3

Line 
1 /* Must be included after mushtype.h to get dbref typedef */
2 #ifndef _CHUNK_H_
3 #define _CHUNK_H_
4
5 #ifdef HAVE_STDINT_H
6 #include <stdint.h>
7 #endif
8
9 #undef LOG_CHUNK_STATS
10
11 typedef uint32_t chunk_reference_t;
12 #define NULL_CHUNK_REFERENCE 0
13
14 chunk_reference_t chunk_create(unsigned char const *data, uint16_t len,
15                                uint8_t derefs);
16 void chunk_delete(chunk_reference_t reference);
17 uint16_t chunk_fetch(chunk_reference_t reference,
18                      unsigned char *buffer, uint16_t buffer_len);
19 uint16_t chunk_len(chunk_reference_t reference);
20 uint8_t chunk_derefs(chunk_reference_t reference);
21 void chunk_migration(int count, chunk_reference_t **references);
22 int chunk_num_swapped(void);
23 void chunk_init(void);
24 enum chunk_stats_type { CSTATS_SUMMARY, CSTATS_REGIONG, CSTATS_PAGINGG,
25   CSTATS_FREESPACEG, CSTATS_REGION, CSTATS_PAGING
26 };
27 void chunk_stats(dbref player, enum chunk_stats_type which);
28 void chunk_new_period(void);
29
30 int chunk_fork_file(void);
31 void chunk_fork_parent(void);
32 void chunk_fork_child(void);
33 void chunk_fork_done(void);
34
35 #endif                          /* _CHUNK_H_ */
Note: See TracBrowser for help on using the browser.