|
Instrument Neutral Distributed Interface INDI 2.2.5
|
#include <stdlib.h>#include <errno.h>#include <stdio.h>Go to the source code of this file.
Classes | |
| struct | shared_buffer |
Macros | |
| #define | _GNU_SOURCE |
| #define | BLOB_SIZE_UNIT 0x100000 |
Typedefs | |
| typedef struct shared_buffer | shared_buffer |
Functions | |
| void * | IDSharedBlobAlloc (size_t size) |
| Allocate a buffer suitable for fast exchange over local links. Warning : the buffer will be sealed (readonly) once exchanged. | |
| void * | IDSharedBlobAttach (int fd, size_t size) |
| void | IDSharedBlobFree (void *ptr) |
| Free a buffer allocated using IDSharedBlobAlloc. Fall back to free for buffer that are not shared blob Must be used for IBLOB.data. | |
| void | IDSharedBlobDettach (void *ptr) |
| Dettach a blob, but don't close its FD. | |
| void * | IDSharedBlobRealloc (void *ptr, size_t size) |
| Adjust the size of a buffer obtained using IDSharedBlobAlloc. | |
| int | IDSharedBlobGetFd (void *ptr) |
| Return the filedescriptor backing up the given shared buffer. | |
| void | IDSharedBlobSeal (void *ptr) |
| Seal (make readonly) a buffer allocated using IDSharedBlobAlloc. This is automatic when IDNewBlob. | |
| #define _GNU_SOURCE |
INDI Copyright (C) 2022 by Ludovic Pollet
This library is free software; you can redistribute it and / or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
Definition at line 23 of file sharedblob.c.
| #define BLOB_SIZE_UNIT 0x100000 |
Definition at line 45 of file sharedblob.c.
| typedef struct shared_buffer shared_buffer |
| void * IDSharedBlobAlloc | ( | size_t | size | ) |
Allocate a buffer suitable for fast exchange over local links. Warning : the buffer will be sealed (readonly) once exchanged.
| size_t | size of the memory area to allocate |
Definition at line 73 of file sharedblob.c.
| void * IDSharedBlobAttach | ( | int | fd, |
| size_t | size | ||
| ) |
Attach to a received shared buffer by ID The returned buffer cannot be realloced or sealed.
Definition at line 109 of file sharedblob.c.
| void IDSharedBlobDettach | ( | void * | ptr | ) |
Dettach a blob, but don't close its FD.
Definition at line 165 of file sharedblob.c.
| void IDSharedBlobFree | ( | void * | ptr | ) |
Free a buffer allocated using IDSharedBlobAlloc. Fall back to free for buffer that are not shared blob Must be used for IBLOB.data.
Definition at line 139 of file sharedblob.c.
| int IDSharedBlobGetFd | ( | void * | ptr | ) |
Return the filedescriptor backing up the given shared buffer.
Definition at line 265 of file sharedblob.c.
| void * IDSharedBlobRealloc | ( | void * | ptr, |
| size_t | size | ||
| ) |
Adjust the size of a buffer obtained using IDSharedBlobAlloc.
| size_t | size of the memory area to allocate |
Definition at line 186 of file sharedblob.c.
| void IDSharedBlobSeal | ( | void * | ptr | ) |
Seal (make readonly) a buffer allocated using IDSharedBlobAlloc. This is automatic when IDNewBlob.
| size_t | size of the memory area to allocate |
Definition at line 281 of file sharedblob.c.