All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <kiszka@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT
Date: Mon, 10 Oct 2005 12:48:57 +0200	[thread overview]
Message-ID: <434A4719.60503@domain.hid> (raw)


[-- 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 --]

             reply	other threads:[~2005-10-10 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-10 10:48 Jan Kiszka [this message]
2005-10-10 11:00 ` [Xenomai-core] [16550-patch] detect required context of RTSER_RTIOC_WAIT_EVENT Philippe Gerum
2005-10-11  8:39   ` [Xenomai-core] [patch] xeno-config --verbose Jim Cromie
2005-10-11  9:38     ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434A4719.60503@domain.hid \
    --to=kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.