Logo
Explore Help
Sign In
mirror/libowfat
1
0
Fork 0
You've already forked libowfat
Code Issues Pull Requests Packages Projects Releases Wiki Activity
libowfat/io/iob_addbuf_munmap.c

12 lines
269 B
C
Raw Normal View History

use callback based infrastructure to reset iob's
2007-10-17 13:25:44 +00:00
#include <sys/types.h>
document the return value expected from the callback given to iob_write remove unused #include in iob_reset if iob_addfile_close fails, it now closes the fd if iob_addbuf_munmap fails, it now munmaps the buf if iob_addbuf_free fails, it now frees the buf some win32 cross-compile fixes for iarray
2012-02-24 02:00:52 +00:00
#include "mmap.h"
add iob_addbuf_munmap
2007-10-17 13:06:56 +00:00
#include "iob_internal.h"
use callback based infrastructure to reset iob's
2007-10-17 13:25:44 +00:00
static void cleanup(struct iob_entry* x) {
document the return value expected from the callback given to iob_write remove unused #include in iob_reset if iob_addfile_close fails, it now closes the fd if iob_addbuf_munmap fails, it now munmaps the buf if iob_addbuf_free fails, it now frees the buf some win32 cross-compile fixes for iarray
2012-02-24 02:00:52 +00:00
mmap_unmap((char*)x->buf,x->offset+x->n);
use callback based infrastructure to reset iob's
2007-10-17 13:25:44 +00:00
}
int iob_addbuf_munmap(io_batch* b,const void* buf,uint64 n) {
return iob_addbuf_internal(b,buf,n,cleanup);
add iob_addbuf_munmap
2007-10-17 13:06:56 +00:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.3 Page: 31ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API