Loading...
Searching...
No Matches
segment.h
Go to the documentation of this file.
#include_next <l4/sys/segment.h>
/*
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#ifndef __L4_SYS__ARCH_X86__L4API_L4F__SEGMENT_H__
#define __L4_SYS__ARCH_X86__L4API_L4F__SEGMENT_H__
#include <l4/sys/compiler.h>
/*****************************************************************************
*** Implementation
*****************************************************************************/
L4_INLINE long
fiasco_gdt_set(l4_cap_idx_t thread, void *desc, unsigned int size,
unsigned int entry_number_start, l4_utcb_t *utcb)
{
l4_utcb_mr_u(utcb)->mr[0] = L4_THREAD_X86_GDT_OP;
l4_utcb_mr_u(utcb)->mr[1] = entry_number_start;
__builtin_memcpy(&l4_utcb_mr_u(utcb)->mr[2], desc, size);
return l4_error_u(l4_ipc_call(thread, utcb, l4_msgtag(L4_PROTO_THREAD, 2 + (size >> 2), 0, 0), L4_IPC_NEVER), utcb);
}
#endif /* ! __L4_SYS__ARCH_X86__L4API_L4F__SEGMENT_H__ */
compiler.h
L4 compiler related defines.
fiasco_gdt_set
long fiasco_gdt_set(l4_cap_idx_t thread, void *desc, unsigned int size, unsigned int entry_number_start, l4_utcb_t *utcb)
Set GDT segment descriptors.
Definition segment.h:41
l4_cap_idx_t
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:336
l4_ipc_call
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
Definition ipc.h:565
l4_msgtag
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
Definition types.h:405
L4_PROTO_THREAD
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
Definition types.h:54
L4_THREAD_X86_GDT_OP
@ L4_THREAD_X86_GDT_OP
Gdt.
Definition thread.h:744
L4_IPC_NEVER
#define L4_IPC_NEVER
never timeout
Definition __timeout.h:76
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
L4_INLINE
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51