Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get info about the current O/S version in a Solaris driver routine

1 view
Skip to first unread message

bea

unread,
Dec 15, 2009, 5:48:32 AM12/15/09
to
How to get info about the current O/S version in a Solaris driver
routine?


Andrew Gabriel

unread,
Dec 15, 2009, 7:42:09 AM12/15/09
to
In article <0c3dace4-c7f9-4712...@y24g2000yqb.googlegroups.com>,

bea <bjorn.ol...@gmail.com> writes:
> How to get info about the current O/S version in a Solaris driver
> routine?

That's probably the wrong question to be asking.
Why do you want to know this?

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

bea

unread,
Dec 15, 2009, 7:53:27 AM12/15/09
to
On 15 Dec, 13:42, and...@cucumber.demon.co.uk (Andrew Gabriel) wrote:
> In article <0c3dace4-c7f9-4712-8442-7a538ad9d...@y24g2000yqb.googlegroups.com>,

>         bea <bjorn.olofsson...@gmail.com> writes:
>
> > How to get info about the current O/S version in a Solaris driver
> > routine?
>
> That's probably the wrong question to be asking.
> Why do you want to know this?
>
> --
> Andrew Gabriel
> [email address is not usable -- followup in the newsgroup]

I want to get the value of SIGRTMIN (the first real-time signal).
The macro SIGRTMIN uses _sysconf which is not available in a Solaris
driver.
The macro _SIGRTMIN which is a constant value but the value is
different depending on the Solaris version.

/bea

bea

unread,
Dec 16, 2009, 8:13:12 AM12/16/09
to

I have found solutions to my two own questions:

Current O/S version in a Solaris driver:
------------------------------------------------------

#include <sys/utsname.h>
extern struct utsname utsname;
...
int my_func()
{
int os_release;
os_release = utsname.release;

....
}

Value of SIGRTMIN (the first real-time signal) independent of current
O/S version:
--------------------------------------------------------------------------------------------------------------------

#include <sys/sysconfig.h>
extern long sysconfig(int cmd);
...
int my_func()
{
long sigrtmin;
sigrtmin = sysconfig(_CONFIG_SIGRT_MIN); /* Note: don't use
_SC_SIGRT_MIN because we are in a driver */

....
}

/bea

0 new messages