* [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT
@ 2005-10-10 10:48 Jan Kiszka
2005-10-10 11:00 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2005-10-10 10:48 UTC (permalink / raw)
To: xenomai
[-- Attachment #1.1: Type: text/plain, Size: 116 bytes --]
Hi,
again thanks to a smart student reviewing my ugly code, here is another
minor fix for the serial driver.
Jan
[-- Attachment #1.2: 16550A-1.1.1.patch --]
[-- Type: text/plain, Size: 1581 bytes --]
Index: drivers/16550A/16550A.c
===================================================================
--- drivers/16550A/16550A.c (revision 14)
+++ drivers/16550A/16550A.c (working copy)
@@ -516,8 +516,8 @@
}
-int rt_16550_ioctl_rt(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request, void *arg)
+int rt_16550_ioctl(struct rtdm_dev_context *context,
+ rtdm_user_info_t *user_info, int request, void *arg)
{
struct rt_16550_context *ctx;
int ret = 0;
@@ -639,6 +639,9 @@
rtdm_lockctx_t lock_ctx;
rtdm_toseq_t timeout_seq;
+ if (!rtdm_in_rt_context())
+ return -EPERM;
+
/* only one waiter allowed, stop any further attempts here */
if (test_and_set_bit(0, &ctx->ioc_event_lock))
return -EBUSY;
@@ -980,8 +983,8 @@
close_rt: rt_16550_close,
close_nrt: rt_16550_close,
- ioctl_rt: rt_16550_ioctl_rt,
- ioctl_nrt: rt_16550_ioctl_rt,
+ ioctl_rt: rt_16550_ioctl,
+ ioctl_nrt: rt_16550_ioctl,
read_rt: rt_16550_read,
read_nrt: NULL,
@@ -999,7 +1002,7 @@
device_class: RTDM_CLASS_SERIAL,
device_sub_class: RTDM_SUBCLASS_16550A,
driver_name: "rt_16550A",
- driver_version: RTDM_DRIVER_VER(1, 1, 0),
+ driver_version: RTDM_DRIVER_VER(1, 1, 1),
peripheral_name: "UART 16550A",
provider_name: "Jan Kiszka",
};
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT
2005-10-10 10:48 [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT Jan Kiszka
@ 2005-10-10 11:00 ` Philippe Gerum
2005-10-11 8:39 ` [Xenomai-core] [patch] xeno-config --verbose Jim Cromie
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2005-10-10 11:00 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai
Jan Kiszka wrote:
> Hi,
>
> again thanks to a smart student reviewing my ugly code, here is another
> minor fix for the serial driver.
>
Applied, thanks.
> Jan
>
>
>
> ------------------------------------------------------------------------
>
> Index: drivers/16550A/16550A.c
> ===================================================================
> --- drivers/16550A/16550A.c (revision 14)
> +++ drivers/16550A/16550A.c (working copy)
> @@ -516,8 +516,8 @@
> }
>
>
> -int rt_16550_ioctl_rt(struct rtdm_dev_context *context,
> - rtdm_user_info_t *user_info, int request, void *arg)
> +int rt_16550_ioctl(struct rtdm_dev_context *context,
> + rtdm_user_info_t *user_info, int request, void *arg)
> {
> struct rt_16550_context *ctx;
> int ret = 0;
> @@ -639,6 +639,9 @@
> rtdm_lockctx_t lock_ctx;
> rtdm_toseq_t timeout_seq;
>
> + if (!rtdm_in_rt_context())
> + return -EPERM;
> +
> /* only one waiter allowed, stop any further attempts here */
> if (test_and_set_bit(0, &ctx->ioc_event_lock))
> return -EBUSY;
> @@ -980,8 +983,8 @@
> close_rt: rt_16550_close,
> close_nrt: rt_16550_close,
>
> - ioctl_rt: rt_16550_ioctl_rt,
> - ioctl_nrt: rt_16550_ioctl_rt,
> + ioctl_rt: rt_16550_ioctl,
> + ioctl_nrt: rt_16550_ioctl,
>
> read_rt: rt_16550_read,
> read_nrt: NULL,
> @@ -999,7 +1002,7 @@
> device_class: RTDM_CLASS_SERIAL,
> device_sub_class: RTDM_SUBCLASS_16550A,
> driver_name: "rt_16550A",
> - driver_version: RTDM_DRIVER_VER(1, 1, 0),
> + driver_version: RTDM_DRIVER_VER(1, 1, 1),
> peripheral_name: "UART 16550A",
> provider_name: "Jan Kiszka",
> };
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Xenomai-core] [patch] xeno-config --verbose
2005-10-10 11:00 ` Philippe Gerum
@ 2005-10-11 8:39 ` Jim Cromie
2005-10-11 9:38 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Jim Cromie @ 2005-10-11 8:39 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
attached patch gives xeno-config a --verbose option, ie:
soekris:/usr/realtime/2.6.13-ski6-v1/bin# xeno-config --v
xeno-config --verbose
--version="2.0"
--cc="gcc"
--cross-compile=""
--arch="i386"
--subarch=""
--prefix="/usr/realtime/2.6.13-ski6-v1"
--config="/usr/realtime/2.6.13-ski6-v1/share/xenomai/config-xenomai-2.0"
--kernel-cflags="-I. -I/usr/realtime/2.6.13-ski6-v1/include
-D__XENO__ -ffast-math -mhard-float" aka --mod*-cflags
--xeno-cflags="-I. -I/usr/realtime/2.6.13-ski6-v1/include -O2
-I/lib/modules/2.6.13-ski6-v1/build/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__ -march=pentium-mmx -Wall -pipe -fstrict-aliasing
-Wno-strict-aliasing" aka --fusion-cflags
--xeno-ldflags="-L/usr/realtime/2.6.13-ski6-v1/lib -lpthread" aka
--fusion-ldlags
--posix-cflags="-I. -I/usr/realtime/2.6.13-ski6-v1/include
-I/usr/realtime/2.6.13-ski6-v1/include/posix -O2
-I/lib/modules/2.6.13-ski6-v1/build/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__ -march=pentium-mmx -Wall -pipe -fstrict-aliasing
-Wno-strict-aliasing"
--posix-ldflags="-L/usr/realtime/2.6.13-ski6-v1/lib -lpthread_rt
-lpthread -lrt"
--uvm-cflags="=-I. -I/usr/realtime/2.6.13-ski6-v1/include -O2
-I/lib/modules/2.6.13-ski6-v1/build/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__ -march=pentium-mmx -Wall -pipe -fstrict-aliasing
-Wno-strict-aliasing -D__XENO_UVM__ "
--uvm-ldflags="=-u__xeno_skin_init
-L/usr/realtime/2.6.13-ski6-v1/lib -luvm -lnucleus -lpthread"
--mod*-dir="=/usr/realtime/2.6.13-ski6-v1/modules"
--sym*-dir="/usr/realtime/2.6.13-ski6-v1/symbols"
--libdir="/usr/realtime/2.6.13-ski6-v1/lib"
--linux-dir="/lib/modules/2.6.13-ski6-v1/build"
--linux-ver*="2.6.13"
When called w/o args, it outputs the above, then prints the (current)
usage message too.
hth
jimc
[-- Attachment #2: patch-xeno-config-3 --]
[-- Type: text/plain, Size: 1920 bytes --]
Index: scripts/xeno-config.in
===================================================================
--- scripts/xeno-config.in (revision 22)
+++ scripts/xeno-config.in (working copy)
@@ -44,10 +44,10 @@
--subarch
--prefix
--config
- --module-cflags
- --module-cxxflags
- --xeno-cflags
- --xeno-ldflags
+ --module-cflags,--kernel-cflags
+ --module-cxxflags,--kernel-cxxflags
+ --xeno-cflags,--fusion-cflags
+ --xeno-ldflags,--fusion-ldflags
--posix-cflags
--posix-ldflags
--uvm-cflags
@@ -61,12 +61,44 @@
exit $1
}
+verbose ()
+{
+ echo xeno-config --verbose
+
+ echo " " --version="\"${XENO_VERSION}\""
+ echo " " --cc="\"$XENO_CC\""
+ echo " " --cross-compile="\"$CROSS_COMPILE\""
+ echo " " --arch="\"$XENO_TARGET_ARCH\""
+ echo " " --subarch="\"$XENO_TARGET_SUBARCH\""
+ echo " " --prefix="\"$XENO_PREFIX\""
+ echo " " --config="\"$XENO_CONFIG\""
+ echo " " --kernel-cflags="\"$XENO_KERNEL_CFLAGS\""
+
+ echo " " --xeno-cflags="\"$XENO_BASE_CFLAGS\""
+ echo " " --xeno-ldflags="\"$XENO_BASE_LDFLAGS\""
+ echo " " --posix-cflags="\"$XENO_POSIX_CFLAGS\""
+ echo " " --posix-ldflags="\"$XENO_POSIX_LDFLAGS\""
+ echo " " --uvm-cflags="\"=$XENO_UVM_CFLAGS \""
+ echo " " --uvm-ldflags="\"=$XENO_UVM_LDFLAGS\""
+
+ echo " " --mod*-dir="\"=$XENO_MODULE_DIR\""
+ echo " " --sym*-dir="\"$XENO_SYMBOL_DIR\""
+ echo " " --libdir="\"$XENO_LIBRARY_DIR\""
+ echo " " --linux-dir="\"$XENO_LINUX_DIR\""
+ echo " " --linux-ver*="\"$XENO_LINUX_VERSION\""
+}
+
if test $# -eq 0; then
+ verbose $*
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
+ --v|--verbose)
+ verbose $*
+ exit 0
+ ;;
--version)
echo ${XENO_VERSION}
;;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] [patch] xeno-config --verbose
2005-10-11 8:39 ` [Xenomai-core] [patch] xeno-config --verbose Jim Cromie
@ 2005-10-11 9:38 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2005-10-11 9:38 UTC (permalink / raw)
To: Jim Cromie; +Cc: xenomai
Jim Cromie wrote:
> attached patch gives xeno-config a --verbose option, ie:
Well, not really a software bug fix, but might be considered as a simple brain
bug fix for users, so the patch made it even through the feature freeze.
Applied, thanks.
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-11 9:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 10:48 [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT Jan Kiszka
2005-10-10 11:00 ` Philippe Gerum
2005-10-11 8:39 ` [Xenomai-core] [patch] xeno-config --verbose Jim Cromie
2005-10-11 9:38 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.