1994 1995 1996 1997 1998 1999 2000 2001 2002 <2003> 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 <2003> 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Linux and EPICS threads |
From: | Andrew Johnson <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | [email protected] |
Date: | Wed, 30 Jul 2003 09:58:17 -0500 |
I am writing device support on Linux for a parallel port device. To talk to the parallel port I use iopl(3) to set the I/O privilege level of the task, and inb() and outb() to write to the I/O ports. This works fine before iocInit. After iocInit the code is running in a new epicsThread, and I find that it has "forgotten" the privilege level, and that I need to call iopl(3) again. This is very inconvenient, because the new thread should not even need to know what kind of device it is talking to.
Is this the correct behavior, and is there a way to change it? I thought that the the ioc was running as a single task in which all threads should have the same privileges. Is there a way to make the new threads inherit the privileges from the parent?
- Andrew -- There are 10 types of people in the world: Those who understand binary, and those who don't.