base/include/rtai_shm.h File Reference


Detailed Description

Interface of the RTAI SHM module.

Author:
Paolo Mantegazza
Note:
Copyright © 1999-2004 Paolo Mantegazza <mantegazza@aero.polimi.it>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file rtai_shm.h.#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <rtai_lxrt.h>

Include dependency graph for rtai_shm.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define GLOBAL_HEAP_ID   0x9ac6d9e5
#define USE_VMALLOC   0
#define USE_GFP_KERNEL   1
#define USE_GFP_ATOMIC   2
#define USE_GFP_DMA   3
#define rtai_kmalloc(name, size)   rt_shm_alloc(name, size, USE_VMALLOC)
 Allocate a chunk of memory to be shared inter-intra kernel modules and Linux processes.
#define rtai_kfree(name)   rt_shm_free(name)
 Free a chunk of shared memory being shared inter-intra kernel modules and Linux processes.
#define RTAI_SHM_DEV   "/dev/rtai_shm"
#define rt_shm_alloc(name, size, suprt)   _rt_shm_alloc(0, name, size, suprt, 0)
#define rt_heap_open(name, size, suprt)   _rt_shm_alloc(0, name, size, suprt, 1)
#define rtai_malloc(name, size)   _rt_shm_alloc(0, name, size, USE_VMALLOC, 0)
 Allocate a chunk of memory to be shared inter-intra kernel modules and Linux processes.
#define rt_shm_alloc_adr(start_address, name, size, suprt)   _rt_shm_alloc(start_address, name, size, suprt, 0)
 Allocate a chunk of memory to be shared inter-intra kernel modules and Linux processes.
#define rt_heap_open_adr(start, name, size, suprt)   _rt_shm_alloc(start, name, size, suprt, 1)
#define rtai_malloc_adr(start_address, name, size)   _rt_shm_alloc(start_address, name, size, USE_VMALLOC, 0)
 Allocate a chunk of memory to be shared inter-intra kernel modules and Linux processes.
#define rtai_free(name, adr)   rt_shm_free(name)
 Free a chunk of shared memory being shared inter-intra kernel modules and Linux processes.
#define rt_heap_close(name, adr)   rt_shm_free(name)
 Close a real time group heap being shared inter-intra kernel modules and Linux processes.
#define rt_heap_init   rt_heap_open
#define rt_heap_create   rt_heap_open
#define rt_heap_acquire   rt_heap_open
#define rt_heap_init_adr   rt_heap_open_adr
#define rt_heap_create_adr   rt_heap_open_adr
#define rt_heap_acquire_adr   rt_heap_open_adr
#define rt_heap_delete   rt_heap_close
#define rt_heap_destroy   rt_heap_close
#define rt_heap_release   rt_heap_close
#define rt_global_heap_open()   rt_heap_open(GLOBAL_HEAP_ID, 0, 0)
 Open the global real time heap to be shared inter-intra kernel modules and Linux processes.
#define rt_global_heap_close()   rt_heap_close(GLOBAL_HEAP_ID, 0)
 Close the global real time heap being shared inter-intra kernel modules and Linux processes.

Functions

void * _rt_shm_alloc (void *start, unsigned long name, int size, int suprt, int isheap)
int rt_shm_free (unsigned long name)
 Free a chunk of shared memory being shared inter-intra kernel modules and Linux processes.
void * rt_halloc (int size)
 Allocate a chunk of a group real time heap in kernel/user space.
void rt_hfree (void *addr)
 Free a chunk of a group real time heap.
void * rt_named_halloc (unsigned long name, int size)
 Allocate a chunk of a group real time heap in kernel/user space.
void rt_named_hfree (void *addr)
 Free a chunk of a group real time heap.
void * rt_malloc (int size)
void rt_free (void *addr)
void * rt_named_malloc (unsigned long name, int size)
 Allocate a chunk of the global real time heap in kernel/user space.
void rt_named_free (void *addr)
 Free a named chunk of the global real time heap.


Generated on Thu Nov 20 11:52:20 2008 for RTAI API by doxygen 1.3.8