// vi:ft=cpp /** * \file * \brief Common task related definitions. */ /* * (c) 2008-2009 Adam Lackorzynski , * Alexander Warg * economic rights: Technische Universität Dresden (Germany) * * This file is part of TUD:OS and distributed under the terms of the * GNU General Public License 2. * Please see the COPYING-GPL-2 file for details. * * As a special exception, you may use this file as part of a free software * library without restriction. Specifically, if other files instantiate * templates or use macros or inline functions from this file, or you compile * this file and link it with other files to produce an executable, this * file does not by itself cause the resulting executable to be covered by * the GNU General Public License. This exception does not however * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. */ #pragma once #include #include namespace L4 { /** * \brief An L4 Task. * \ingroup l4_task_api * * \#include * * \see \ref l4_task_api for an overview description. * */ class Task : public Kobject_t { L4_KOBJECT(Task) public: /** * \copydoc l4_task_map() * \note \a dst_task is the implicit \a this pointer. */ l4_msgtag_t map(Cap const &src_task, l4_fpage_t const &snd_fpage, l4_addr_t snd_base, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_map_u(cap(), src_task.cap(), snd_fpage, snd_base, utcb); } /** * \copydoc l4_task_unmap() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t unmap(l4_fpage_t const &fpage, l4_umword_t map_mask, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_unmap_u(cap(), fpage, map_mask, utcb); } /** * \copydoc l4_task_unmap_batch() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t unmap_batch(l4_fpage_t const *fpages, unsigned num_fpages, l4_umword_t map_mask, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_unmap_batch_u(cap(), fpages, num_fpages, map_mask, utcb); } /** * \copydoc l4_task_delete_obj() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t delete_obj(L4::Cap obj, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_delete_obj_u(cap(), obj.cap(), utcb); } /** * \copydoc l4_task_release_cap() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t release_cap(L4::Cap cap, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_release_cap_u(this->cap(), cap.cap(), utcb); } /** * \copydoc l4_task_cap_valid() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t cap_valid(Cap const &cap, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_cap_valid_u(this->cap(), cap.cap(), utcb); } /** * \copydoc l4_task_cap_has_child() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t cap_has_child(Cap const &cap, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_cap_has_child_u(this->cap(), cap.cap(), utcb); } /** * \copydoc l4_task_cap_equal() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t cap_equal(Cap const &cap_a, Cap const &cap_b, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_cap_equal_u(cap(), cap_a.cap(), cap_b.cap(), utcb); } /** * \copydoc l4_task_add_ku_mem() * \note \a task is the implicit \a this pointer. */ l4_msgtag_t add_ku_mem(l4_fpage_t const &fpage, l4_utcb_t *utcb = l4_utcb()) throw() { return l4_task_add_ku_mem_u(cap(), fpage, utcb); } }; }