summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rw-r--r--configure.ac37
-rw-r--r--src/Makefile.am4
-rw-r--r--src/rt-app_types.h13
4 files changed, 41 insertions, 14 deletions
diff --git a/.bzrignore b/.bzrignore
index fb4c618..c2165aa 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -25,3 +25,4 @@ src/rt-app
./README
rt-app-**.tar.**
dist
+./libdl
diff --git a/configure.ac b/configure.ac
index f1e6338..2d3c597 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,21 +10,34 @@ AC_HEADER_STDC
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([m], [round])
AC_CHECK_LIB([rt], [clock_gettime])
+
AC_ARG_WITH([aquosa],
- [AS_HELP_STRING([--enable-aquosa],
- [Add support for the AQuoSA framework])],
+ [AS_HELP_STRING([--with-aquosa],
+ [Add support for the AQuoSA framework])],
+ [],
+ [with_aquosa=no])
+
+ QRESLIB=
+ AS_IF([test "x$with_readline" != xno],
+ [AC_CHECK_LIB([qreslib], [qres_init],
+ [AC_SUBST([QRESLIB], ["-lqreslib"])
+ AC_DEFINE([AQUOSA], [1],
+ [Define if you have libqreslib])
+ ],
+ [AC_MSG_FAILURE(
+ [qreslib test failed (--without-aquosa to disable)])],
+ [-lqreslib])])
+
+AC_ARG_WITH([deadline],
+ [AS_HELP_STRING([--enable-deadline],
+ [Add support for SCHED_DEADLINE])],
[],
- [with_aquosa=check])
+ [with_deadline=no])
LIBQRESLIB=
-AS_IF([test "x$with_aquosa" != xno],
- [AC_CHECK_LIB([qreslib], [qres_init],
- [AC_SUBST([LIBQRESLIB], ["-lqreslib"])
- AC_DEFINE([AQUOSA],[1], [Define if you have qreslib])
- ],
- [if test "x$with_aquosa" != xcheck; then
- AC_MSG_FAILURE([AQuoSA library not found])
- fi
- ], -lqreslib)])
+AS_IF([test "x$with_deadline" != xno],
+ [AC_DEFINE([DEADLINE], [1], [Define if you have SCHED_DEADLINE support])
+ ])
+
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([Makefile src/Makefile README:README.in INSTALL:INSTALL.in])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 73ac1bf..63bb8e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = rt-app
-rt_app_SOURCES= rt-app_args.h rt-app_utils.h rt-app.h rt-app_types.h rt-app_args.c rt-app_utils.c rt-app.c
+rt_app_SOURCES= dl_syscalls.h rt-app_args.h rt-app_utils.h rt-app.h rt-app_types.h \
+ dl_syscalls.c rt-app_args.c rt-app_utils.c rt-app.c
+rt_app_LDADD = $(QRESLIB)
diff --git a/src/rt-app_types.h b/src/rt-app_types.h
index 8ba62a5..4721307 100644
--- a/src/rt-app_types.h
+++ b/src/rt-app_types.h
@@ -29,6 +29,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <aquosa/qres_lib.h>
#endif /* AQUOSA */
+#ifdef DEADLINE
+#include "dl_syscalls.h"
+#endif
+
typedef enum policy_t
{
other = SCHED_OTHER,
@@ -37,6 +41,9 @@ typedef enum policy_t
#ifdef AQUOSA
, aquosa = 1000
#endif
+#ifdef DEADLINE
+ , deadline = SCHED_DEADLINE
+#endif
} policy_t;
struct thread_data {
@@ -54,12 +61,16 @@ struct thread_data {
policy_t sched_policy;
char sched_policy_descr[16];
int sched_prio;
-
+
#ifdef AQUOSA
int fragment;
int sid;
qres_params_t params;
#endif
+
+#ifdef DEADLINE
+ struct sched_param_ex dl_params;
+#endif
};
typedef struct _timing_point_t {