OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [glue/] [arm/] [ipc.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#ifndef __GLUE_ARM_IPC_H__
2
#define __GLUE_ARM_IPC_H__
3
 
4
#include <l4/generic/tcb.h>
5
#include INC_GLUE(message.h)
6
 
7
static inline int extended_ipc_msg_index(unsigned int flags)
8
{
9
        return (flags & IPC_FLAGS_MSG_INDEX_MASK)
10
               >> IPC_FLAGS_MSG_INDEX_SHIFT;
11
}
12
 
13
static inline int extended_ipc_msg_size(unsigned int flags)
14
{
15
        return (flags & IPC_FLAGS_SIZE_MASK)
16
               >> IPC_FLAGS_SIZE_SHIFT;
17
}
18
 
19
static inline void tcb_set_ipc_flags(struct ktcb *task,
20
                                     unsigned int flags)
21
{
22
        task->ipc_flags = flags;
23
}
24
 
25
static inline unsigned int tcb_get_ipc_flags(struct ktcb *task)
26
{
27
        return task->ipc_flags;
28
}
29
 
30
static inline unsigned int
31
ipc_flags_set_type(unsigned int flags, unsigned int type)
32
{
33
        flags &= ~IPC_FLAGS_TYPE_MASK;
34
        flags |= type & IPC_FLAGS_TYPE_MASK;
35
        return flags;
36
}
37
 
38
static inline unsigned int ipc_flags_get_type(unsigned int flags)
39
{
40
        return flags & IPC_FLAGS_TYPE_MASK;
41
}
42
 
43
static inline void tcb_set_ipc_type(struct ktcb *task,
44
                                    unsigned int type)
45
{
46
        task->ipc_flags = ipc_flags_set_type(task->ipc_flags,
47
                                             type);
48
}
49
 
50
static inline unsigned int tcb_get_ipc_type(struct ktcb *task)
51
{
52
        return ipc_flags_get_type(task->ipc_flags);
53
}
54
 
55
#endif /* __GLUE_ARM_IPC_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.