1 /*- 2 * Copyright (c) 2001, 2020 Oracle and/or its affiliates. All rights reserved. 3 * 4 * See the file LICENSE for license information. 5 * 6 * $Id$ 7 */ 8 9 #ifndef _DB_FOP_H_ 10 #define _DB_FOP_H_ 11 12 #if defined(__cplusplus) 13 extern "C" { 14 #endif 15 16 #define MAKE_INMEM(D) do { \ 17 F_SET((D), DB_AM_INMEM); \ 18 (void)__memp_set_flags((D)->mpf, DB_MPOOL_NOFILE, 1); \ 19 } while (0) 20 21 #define CLR_INMEM(D) do { \ 22 F_CLR((D), DB_AM_INMEM); \ 23 (void)__memp_set_flags((D)->mpf, DB_MPOOL_NOFILE, 0); \ 24 } while (0) 25 26 /* 27 * Never change the value of DB_FOP_CREATE (0x00000002), 28 * DB_FOP_APPEND (0x00000001), and DB_FOP_REDO(0x00000008), 29 * as those values are used in write_file logs. 30 */ 31 #define DB_FOP_APPEND 0x00000001 /* Appending to a file. */ 32 #define DB_FOP_CREATE 0x00000002 /* Creating the file. */ 33 #define DB_FOP_PARTIAL_LOG 0x00000004 /* Partial logging of file data. */ 34 #define DB_FOP_REDO 0x00000008 /* File operation can be redone. */ 35 #define DB_FOP_READONLY 0x00000010 /* File is read only. */ 36 #define DB_FOP_WRITE 0x00000020 /* File is writeable. */ 37 #define DB_FOP_SYNC_WRITE 0x00000040 /* Sync file on each write. */ 38 39 #include "dbinc_auto/fileops_auto.h" 40 #include "dbinc_auto/fileops_ext.h" 41 42 #if defined(__cplusplus) 43 } 44 #endif 45 #endif /* !_DB_FOP_H_ */ 46