00001 /**************************************************************************** 00002 00003 dssi_shm.h - functions that can handle shared memory segments for 00004 DSSI plugins and UIs 00005 00006 Copyright (C) 2005 Lars Luthman <larsl@users.sourceforge.net> 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA 00021 00022 ****************************************************************************/ 00023 00024 #ifndef DSSI_SHM_H 00025 #define DSSI_SHM_H 00026 00049 #if defined(__cplusplus) 00050 extern "C" { 00051 #endif 00052 00054 /* @{ */ 00055 00068 void* dssi_shm_allocate(size_t bytes, char** key, char** used_flag); 00069 00075 int dssi_shm_free(const char* key); 00076 00077 /* @} */ 00078 00079 00081 /* @{ */ 00082 00091 void* dssi_shm_attach(const char* key, void* old_ptr, size_t* size); 00092 00093 void dssi_shm_unlock(void* ptr, size_t size); 00094 00100 int dssi_shm_detach(void* ptr); 00101 00102 /* @} */ 00103 00104 00105 #if defined(__cplusplus) 00106 } 00107 #endif 00108 00109 #endif