X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osl.h;h=06fe669e1f947fe18843e14725f20726da4be56d;hp=2fdee777741f07ce65758432ab86fed52e67c267;hb=4591d3022ef21b5148a604d1099eacd85570bde0;hpb=15d21005beb3b173ba9909e522782201fdf0d5b8 diff --git a/osl.h b/osl.h index 2fdee777..06fe669e 100644 --- a/osl.h +++ b/osl.h @@ -58,7 +58,9 @@ enum osl_storage_flags { /** The data for this column will have constant size. */ OSL_FIXED_SIZE = 2, /** All values of this column will be different. */ - OSL_UNIQUE = 4 + OSL_UNIQUE = 4, + /** Do not free the data for this column (\p OSL_NO_STORAGE). */ + OSL_DONT_FREE = 8 }; struct osl_table; @@ -179,26 +181,7 @@ int osl_get_rank(const struct osl_table *t, struct osl_row *r, int for_each_file_in_dir(const char *dirname, int (*func)(const char *, const void *), const void *private_data); -int mmap_full_file(const char *filename, int open_mode, struct osl_object *obj); ssize_t para_write_all(int fd, const void *buf, size_t size); int para_lseek(int fd, off_t *offset, int whence); int para_write_file(const char *filename, const void *buf, size_t size); -/** - * A wrapper for munmap(2). - * - * \param start The start address of the memory mapping. - * \param length The size of the mapping. - * - * \return Positive on success, \p -E_MUNMAP on errors. - * - * \sa munmap(2), mmap_full_file(). - */ -_static_inline_ int para_munmap(void *start, size_t length) -{ - if (munmap(start, length) >= 0) - return 1; - PARA_ERROR_LOG("munmap (%p/%zu) failed: %s\n", start, length, - strerror(errno)); - return -E_MUNMAP; -}