|
Blender
V2.93
|
#include "BLI_mmap.h"#include "BLI_fileops.h"#include "BLI_listbase.h"#include "MEM_guardedalloc.h"#include <string.h>#include <signal.h>#include <stdlib.h>#include <sys/mman.h>#include <unistd.h>Go to the source code of this file.
Classes | |
| struct | BLI_mmap_file |
| struct | error_handler_data |
Functions | |
| static void | sigbus_handler (int sig, siginfo_t *siginfo, void *ptr) |
| static bool | sigbus_handler_setup (void) |
| static void | sigbus_handler_add (BLI_mmap_file *file) |
| static void | sigbus_handler_remove (BLI_mmap_file *file) |
| BLI_mmap_file * | BLI_mmap_open (int fd) |
| bool | BLI_mmap_read (BLI_mmap_file *file, void *dest, size_t offset, size_t length) |
| void * | BLI_mmap_get_pointer (BLI_mmap_file *file) |
| void | BLI_mmap_free (BLI_mmap_file *file) |
Variables | |
| static struct error_handler_data | error_handler = {0} |
| void BLI_mmap_free | ( | BLI_mmap_file * | file | ) |
Definition at line 226 of file BLI_mmap.c.
References file, MEM_freeN, and sigbus_handler_remove().
Referenced by blo_filedata_free(), IMB_loadifffile(), and imb_loadtilefile().
| void* BLI_mmap_get_pointer | ( | BLI_mmap_file * | file | ) |
Definition at line 221 of file BLI_mmap.c.
References file.
Referenced by IMB_loadifffile(), and imb_loadtilefile().
| BLI_mmap_file* BLI_mmap_open | ( | int | fd | ) |
Definition at line 147 of file BLI_mmap.c.
References BLI_lseek(), file, length(), MEM_callocN, NULL, sigbus_handler_add(), and sigbus_handler_setup().
Referenced by blo_filedata_from_file_descriptor(), IMB_loadifffile(), and imb_loadtilefile().
| bool BLI_mmap_read | ( | BLI_mmap_file * | file, |
| void * | dest, | ||
| size_t | offset, | ||
| size_t | length | ||
| ) |
Definition at line 194 of file BLI_mmap.c.
References file, and length().
Referenced by fd_read_from_mmap().
|
static |
Definition at line 76 of file BLI_mmap.c.
References BLI_assert, error_handler, file, LISTBASE_FOREACH, error_handler_data::next_handler, error_handler_data::open_mmaps, and ptr.
Referenced by sigbus_handler_setup().
|
static |
Definition at line 134 of file BLI_mmap.c.
References BLI_addtail(), BLI_genericNodeN(), error_handler, file, and error_handler_data::open_mmaps.
Referenced by BLI_mmap_open().
|
static |
Definition at line 140 of file BLI_mmap.c.
References BLI_findptr(), BLI_freelinkN(), data, error_handler, file, and error_handler_data::open_mmaps.
Referenced by BLI_mmap_free().
|
static |
Definition at line 112 of file BLI_mmap.c.
References error_handler_data::configured, error_handler, error_handler_data::next_handler, and sigbus_handler().
Referenced by BLI_mmap_open().
|
static |
Referenced by sigbus_handler(), sigbus_handler_add(), sigbus_handler_remove(), and sigbus_handler_setup().