Instrument Neutral Distributed Interface INDI 2.2.5
sharedblob.h
Go to the documentation of this file.
1#pragma once
2
3#include <stddef.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
12extern void * IDSharedBlobAlloc(size_t size);
13
19extern void * IDSharedBlobAttach(int fd, size_t size);
20
24extern void IDSharedBlobFree(void * ptr);
25
28extern void IDSharedBlobDettach(void * ptr);
29
33extern void * IDSharedBlobRealloc(void * ptr, size_t size);
34
38extern int IDSharedBlobGetFd(void * ptr);
39
43extern void IDSharedBlobSeal(void * ptr);
44
45#ifdef __cplusplus
46}
47#endif
48
49void * IDSharedBlobAlloc(size_t size);
50
int fd
void IDSharedBlobFree(void *ptr)
Free a buffer allocated using IDSharedBlobAlloc. Fall back to free for buffer that are not shared blo...
Definition sharedblob.c:139
void * IDSharedBlobAttach(int fd, size_t size)
Definition sharedblob.c:109
void * IDSharedBlobRealloc(void *ptr, size_t size)
Adjust the size of a buffer obtained using IDSharedBlobAlloc.
Definition sharedblob.c:186
void * IDSharedBlobAlloc(size_t size)
Allocate a buffer suitable for fast exchange over local links. Warning : the buffer will be sealed (r...
Definition sharedblob.c:73
void IDSharedBlobDettach(void *ptr)
Dettach a blob, but don't close its FD.
Definition sharedblob.c:165
int IDSharedBlobGetFd(void *ptr)
Return the filedescriptor backing up the given shared buffer.
Definition sharedblob.c:265
void IDSharedBlobSeal(void *ptr)
Seal (make readonly) a buffer allocated using IDSharedBlobAlloc. This is automatic when IDNewBlob.
Definition sharedblob.c:281