summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2012-04-23 09:10:04 -0400
committerGedare Bloom <gedare@rtems.org>2012-04-23 09:26:34 -0400
commitfb78f9170f71170a6b2ca3c78bb54ed3c5f6b1ed (patch)
tree627e77e7e555ad228e057091ad30e46a944c23e6 /cpukit
parentscore: Documentation (diff)
downloadrtems-fb78f9170f71170a6b2ca3c78bb54ed3c5f6b1ed.tar.bz2
PR1908: consolidate libqos code and fix installed header location
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/Makefile.am4
-rw-r--r--cpukit/configure.ac1
-rw-r--r--cpukit/libqos/Makefile.am12
-rw-r--r--cpukit/libqos/preinstall.am28
-rw-r--r--cpukit/libqos/qreslib.h189
-rw-r--r--cpukit/libqos/qreslib.inl214
-rw-r--r--cpukit/preinstall.am4
7 files changed, 195 insertions, 257 deletions
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 765716627a..542d512153 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -15,7 +15,6 @@ SUBDIRS += libi2c
SUBDIRS += libmisc
SUBDIRS += libmd
SUBDIRS += libgnat
-SUBDIRS += libqos
SUBDIRS += wrapup
SUBDIRS += zlib
@@ -166,6 +165,9 @@ include_rtems_HEADERS += libmisc/fb/mw_uid.h
include_rtems_HEADERS += libmisc/mouse/mouse_parser.h
include_rtems_HEADERS += libmisc/mouse/serial_mouse.h
+## libqos
+include_rtems_HEADERS += libqos/qreslib.h
+
## shell
if LIBSHELL
include_rtems_HEADERS += libmisc/shell/shell.h
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 1066e41fdd..7c5c731361 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -380,7 +380,6 @@ librpc/Makefile
libmisc/Makefile
libi2c/Makefile
libmd/Makefile
-libqos/Makefile
zlib/Makefile
ftpd/Makefile
telnetd/Makefile
diff --git a/cpukit/libqos/Makefile.am b/cpukit/libqos/Makefile.am
deleted file mode 100644
index 3223dcddd2..0000000000
--- a/cpukit/libqos/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-include $(top_srcdir)/automake/multilib.am
-include $(top_srcdir)/automake/compile.am
-
-include_HEADERS = qreslib.h
-include_HEADERS += qreslib.inl
-
-include $(srcdir)/preinstall.am
-include $(top_srcdir)/automake/local.am
diff --git a/cpukit/libqos/preinstall.am b/cpukit/libqos/preinstall.am
deleted file mode 100644
index 9b48932f2c..0000000000
--- a/cpukit/libqos/preinstall.am
+++ /dev/null
@@ -1,28 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES = $(PREINSTALL_DIRS)
-
-all-am: $(PREINSTALL_FILES)
-
-PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
-
-$(PROJECT_INCLUDE)/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)
- @: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_INCLUDE)/qreslib.h: qreslib.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/qreslib.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/qreslib.h
-
-$(PROJECT_INCLUDE)/qreslib.inl: qreslib.inl $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/qreslib.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/qreslib.inl
-
diff --git a/cpukit/libqos/qreslib.h b/cpukit/libqos/qreslib.h
index 22bbd3ee62..59bbbc3a96 100644
--- a/cpukit/libqos/qreslib.h
+++ b/cpukit/libqos/qreslib.h
@@ -71,7 +71,194 @@ typedef struct {
uint32_t Q;
} qres_params_t;
-#include <qreslib.inl>
+/**
+ * @brief qres init
+ *
+ * Initializes the QoS RES library.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_init ( void )
+{
+ return _Scheduler_CBS_Initialize();
+}
+
+/**
+ * @brief qres cleanup
+ *
+ * Cleanup resources associated to the QoS RES Library.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_cleanup ( void )
+{
+ return _Scheduler_CBS_Cleanup();
+}
+
+/**
+ * @brief qres create server
+ *
+ * Create a new server with specified parameters.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_create_server (
+ qres_params_t *params,
+ qres_sid_t *server_id
+)
+{
+ return _Scheduler_CBS_Create_server(
+ (Scheduler_CBS_Parameters *) params,
+ NULL,
+ server_id
+ );
+}
+
+/**
+ * @brief qres attach thread
+ *
+ * Attach a task to an already existing server.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_attach_thread (
+ qres_sid_t server_id,
+ pid_t pid,
+ tid_t task_id
+)
+{
+ return _Scheduler_CBS_Attach_thread( server_id, task_id );
+}
+
+/**
+ * @brief qres detach thread
+ *
+ * Detach from the QoS Server.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_detach_thread (
+ qres_sid_t server_id,
+ pid_t pid,
+ tid_t task_id
+)
+{
+ return _Scheduler_CBS_Detach_thread( server_id, task_id );
+}
+
+/**
+ * @brief qres destroy server
+ *
+ * Detach all tasks from a server and destroy it.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_destroy_server (
+ qres_sid_t server_id
+)
+{
+ return _Scheduler_CBS_Destroy_server( server_id );
+}
+
+/**
+ * @brief qres get server id
+ *
+ * Get a thread server id, or QOS_E_NOT_FOUND if it is not
+ * attached to any server.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_get_sid (
+ pid_t pid,
+ tid_t task_id,
+ qres_sid_t *server_id
+)
+{
+ return _Scheduler_CBS_Get_server_id( task_id, server_id );
+}
+
+/**
+ * @brief qres get params
+ *
+ * Retrieve QoS scheduling parameters.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_get_params (
+ qres_sid_t server_id,
+ qres_params_t *params
+)
+{
+ return _Scheduler_CBS_Get_parameters(
+ server_id,
+ (Scheduler_CBS_Parameters *) params
+ );
+}
+
+/**
+ * @brief qres set params
+ *
+ * Change QoS scheduling parameters.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_set_params (
+ qres_sid_t server_id,
+ qres_params_t *params
+)
+{
+ return _Scheduler_CBS_Set_parameters(
+ server_id,
+ (Scheduler_CBS_Parameters *) params
+ );
+}
+
+/**
+ * @brief qres get execution time
+ *
+ * Retrieve time info relative to the current server.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_get_exec_time (
+ qres_sid_t server_id,
+ qres_time_t *exec_time,
+ qres_atime_t *abs_time
+)
+{
+ return _Scheduler_CBS_Get_execution_time( server_id, exec_time, abs_time );
+}
+
+/**
+ * @brief qres get current budget
+ *
+ * Retrieve remaining budget for the current server instance.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_get_curr_budget (
+ qres_sid_t server_id,
+ qres_time_t *current_budget
+)
+{
+ return _Scheduler_CBS_Get_remaining_budget( server_id, current_budget );
+}
+
+/**
+ * @brief qres get approved budget
+ *
+ * Retrieve the budget that has been approved for the subsequent
+ * server instances.
+ *
+ * @return status code.
+ */
+RTEMS_INLINE_ROUTINE qos_rv qres_get_appr_budget (
+ qres_sid_t server_id,
+ qres_time_t *appr_budget
+)
+{
+ return _Scheduler_CBS_Get_approved_budget( server_id, appr_budget );
+}
#ifdef __cplusplus
}
diff --git a/cpukit/libqos/qreslib.inl b/cpukit/libqos/qreslib.inl
deleted file mode 100644
index 094d1e6cdd..0000000000
--- a/cpukit/libqos/qreslib.inl
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * @file qreslib.inl
- *
- * This include file contains all the constants and structures associated
- * with the QoS RES library.
- *
- * @note The library is available only together with CBS scheduler.
- */
-
-/*
- * Copyright (C) 2011 Petr Benes.
- * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _QRESLIB_H
-# error "Never use <qreslib.inl> directly; include <qreslib.h> instead."
-#endif
-
-#include <rtems/score/schedulercbs.h>
-
-/**
- * @brief qres init
- *
- * Initializes the QoS RES library.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_init ( void )
-{
- return _Scheduler_CBS_Initialize();
-}
-
-/**
- * @brief qres cleanup
- *
- * Cleanup resources associated to the QoS RES Library.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_cleanup ( void )
-{
- return _Scheduler_CBS_Cleanup();
-}
-
-/**
- * @brief qres create server
- *
- * Create a new server with specified parameters.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_create_server (
- qres_params_t *params,
- qres_sid_t *server_id
-)
-{
- return _Scheduler_CBS_Create_server(
- (Scheduler_CBS_Parameters *) params,
- NULL,
- server_id
- );
-}
-
-/**
- * @brief qres attach thread
- *
- * Attach a task to an already existing server.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_attach_thread (
- qres_sid_t server_id,
- pid_t pid,
- tid_t task_id
-)
-{
- return _Scheduler_CBS_Attach_thread( server_id, task_id );
-}
-
-/**
- * @brief qres detach thread
- *
- * Detach from the QoS Server.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_detach_thread (
- qres_sid_t server_id,
- pid_t pid,
- tid_t task_id
-)
-{
- return _Scheduler_CBS_Detach_thread( server_id, task_id );
-}
-
-/**
- * @brief qres destroy server
- *
- * Detach all tasks from a server and destroy it.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_destroy_server (
- qres_sid_t server_id
-)
-{
- return _Scheduler_CBS_Destroy_server( server_id );
-}
-
-/**
- * @brief qres get server id
- *
- * Get a thread server id, or QOS_E_NOT_FOUND if it is not
- * attached to any server.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_get_sid (
- pid_t pid,
- tid_t task_id,
- qres_sid_t *server_id
-)
-{
- return _Scheduler_CBS_Get_server_id( task_id, server_id );
-}
-
-/**
- * @brief qres get params
- *
- * Retrieve QoS scheduling parameters.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_get_params (
- qres_sid_t server_id,
- qres_params_t *params
-)
-{
- return _Scheduler_CBS_Get_parameters(
- server_id,
- (Scheduler_CBS_Parameters *) params
- );
-}
-
-/**
- * @brief qres set params
- *
- * Change QoS scheduling parameters.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_set_params (
- qres_sid_t server_id,
- qres_params_t *params
-)
-{
- return _Scheduler_CBS_Set_parameters(
- server_id,
- (Scheduler_CBS_Parameters *) params
- );
-}
-
-/**
- * @brief qres get execution time
- *
- * Retrieve time info relative to the current server.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_get_exec_time (
- qres_sid_t server_id,
- qres_time_t *exec_time,
- qres_atime_t *abs_time
-)
-{
- return _Scheduler_CBS_Get_execution_time( server_id, exec_time, abs_time );
-}
-
-/**
- * @brief qres get current budget
- *
- * Retrieve remaining budget for the current server instance.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_get_curr_budget (
- qres_sid_t server_id,
- qres_time_t *current_budget
-)
-{
- return _Scheduler_CBS_Get_remaining_budget( server_id, current_budget );
-}
-
-/**
- * @brief qres get approved budget
- *
- * Retrieve the budget that has been approved for the subsequent
- * server instances.
- *
- * @return status code.
- */
-RTEMS_INLINE_ROUTINE qos_rv qres_get_appr_budget (
- qres_sid_t server_id,
- qres_time_t *appr_budget
-)
-{
- return _Scheduler_CBS_Get_approved_budget( server_id, appr_budget );
-}
diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am
index 8671a8c5e6..f6d24bb78f 100644
--- a/cpukit/preinstall.am
+++ b/cpukit/preinstall.am
@@ -337,6 +337,10 @@ $(PROJECT_INCLUDE)/rtems/serial_mouse.h: libmisc/mouse/serial_mouse.h $(PROJECT_
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/serial_mouse.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/serial_mouse.h
+$(PROJECT_INCLUDE)/rtems/qreslib.h: libqos/qreslib.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/qreslib.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/qreslib.h
+
if LIBSHELL
$(PROJECT_INCLUDE)/rtems/shell.h: libmisc/shell/shell.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/shell.h