L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
ipc.h
Go to the documentation of this file.
1
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Alexander Warg <warg@os.inf.tu-dresden.de>
9 * economic rights: Technische Universität Dresden (Germany)
10 *
11 * This file is part of TUD:OS and distributed under the terms of the
12 * GNU General Public License 2.
13 * Please see the COPYING-GPL-2 file for details.
14 *
15 * As a special exception, you may use this file as part of a free software
16 * library without restriction. Specifically, if other files instantiate
17 * templates or use macros or inline functions from this file, or you compile
18 * this file and link it with other files to produce an executable, this
19 * file does not by itself cause the resulting executable to be covered by
20 * the GNU General Public License. This exception does not however
21 * invalidate any other reasons why the executable file might be covered by
22 * the GNU General Public License.
23 */
24#pragma once
25
26#include_next <l4/sys/ipc.h>
27
28#ifdef __GNUC__
29
30#include <l4/sys/compiler.h>
31#include <l4/sys/syscall_defs.h>
32
35 l4_umword_t flags,
36 l4_umword_t slabel,
37 l4_msgtag_t tag,
38 l4_umword_t *rlabel,
40{
41 register l4_umword_t _dest __asm__("r2") = dest | flags;
42 register l4_umword_t _timeout __asm__("r3") = timeout.raw;
43 register l4_mword_t _tag __asm__("r0") = tag.raw;
44 register l4_umword_t _label __asm__("r4") = slabel;
45 (void)utcb;
46
47 __asm__ __volatile__
48 ("mov r5, %[sc] \n"
49 "blx __l4_sys_syscall \n"
50 :
51 "+r" (_dest),
52 "+r" (_timeout),
53 "+r" (_label),
54 "+r" (_tag)
55 :
56 [sc] "i" (L4_SYSCALL_INVOKE)
57 :
58 "cc", "memory", "r5", "ip", "lr");
59
60 if (rlabel)
61 *rlabel = _label;
62 tag.raw = _tag;
63
64 return tag;
65}
66
67#endif //__GNUC__
L4 compiler related defines.
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
signed long l4_mword_t
Signed machine word.
Definition l4int.h:48
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
l4_msgtag_t l4_ipc(l4_cap_idx_t dest, l4_utcb_t *utcb, l4_umword_t flags, l4_umword_t slabel, l4_msgtag_t tag, l4_umword_t *rlabel, l4_timeout_t timeout) L4_NOTHROW
Generic L4 object invocation.
Definition ipc.h:33
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:67
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:188
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:62
Message tag data structure.
Definition types.h:164
l4_mword_t raw
raw value
Definition types.h:165
Syscall entry definitions.
Timeout pair.
Definition __timeout.h:61