Hello list.
If I want to check a sysctl value from within the kernel (e.g. an KLD),
should I use the system calls described in sysctl(3) ?
If not, what is the propper way to do so ?
And if it is and I want to do error checking e.g:
if((sysctl(name, namelen, &val, NULL, 0)) != 0) {
"Erro
On Thursday 04 August 2005 20:15, John Baldwin wrote:
> On Thursday 04 August 2005 12:50 pm, Hans Petter Selasky wrote:
> > On Thursday 04 August 2005 15:53, John Baldwin wrote:
> > > On Thursday 04 August 2005 07:40 am, Hans Petter Selasky wrote:
> > > > On Wednesday 03 August 2005 19:21, John Bal
On Thu, Aug 04, 2005 at 06:50:12PM +0200, Hans Petter Selasky wrote:
> 2) nonblocking: increment some other refcount that the
>callback checks before accessing any data.
I think people usually call this something like a "generation count".
This sort of scheme used to be used for vnodes in Free
On Thursday 04 August 2005 12:50 pm, Hans Petter Selasky wrote:
> On Thursday 04 August 2005 15:53, John Baldwin wrote:
> > On Thursday 04 August 2005 07:40 am, Hans Petter Selasky wrote:
> > > On Wednesday 03 August 2005 19:21, John Baldwin wrote:
> > > > On Tuesday 02 August 2005 06:23 pm, Hans P
On Thursday 04 August 2005 15:53, John Baldwin wrote:
> On Thursday 04 August 2005 07:40 am, Hans Petter Selasky wrote:
> > On Wednesday 03 August 2005 19:21, John Baldwin wrote:
> > > On Tuesday 02 August 2005 06:23 pm, Hans Petter Selasky wrote:
> > > > Hi,
> > > >
> > > > I am looking for a safe
On Thursday 04 August 2005 14:08, Max Laier wrote:
> On Thursday 04 August 2005 13:40, Hans Petter Selasky wrote:
> > This is a copy and paste from the kernel sources:
> >
> > struct ucred *
> > crhold(struct ucred *cr)
> > {
> > The problem is, what happens if the kernel switches thread right here
On Thursday 04 August 2005 07:40 am, Hans Petter Selasky wrote:
> On Wednesday 03 August 2005 19:21, John Baldwin wrote:
> > On Tuesday 02 August 2005 06:23 pm, Hans Petter Selasky wrote:
> > > Hi,
> > >
> > > I am looking for a safe way to access structures that can be freed. The
> > > solution I
Hi,
I have found the scenario in which our libc behaves utterly
suboptimally. Consider the following piece of code reads and processes
every other 512-bytes block in a file (error handling intentionally
omitted):
FILE *f;
int i;
char buf[512];
f = fopen(...);
for (i = 0; feof(f) == 0; i++)
On Thursday 04 August 2005 13:40, Hans Petter Selasky wrote:
> This is a copy and paste from the kernel sources:
>
> struct ucred *
> crhold(struct ucred *cr)
> {
> The problem is, what happens if the kernel switches thread right here, and
> then the other thread calls "crfree()" on this structure,
On Wednesday 03 August 2005 19:21, John Baldwin wrote:
> On Tuesday 02 August 2005 06:23 pm, Hans Petter Selasky wrote:
> > Hi,
> >
> > I am looking for a safe way to access structures that can be freed. The
> > solution I am looking for must not:
> >
> > - hinder scaleability
> > - lead to use of
>> #define DEVICE2SOFTC(device) ((struct dev_softc
>> *)device_get_softc(device))
>>
>> static void dev_intr(void *arg);
>>
>> struct dev_softc {
>> ...
>> int rid_irq;
>> struct resource* res_irq;
>> void *intr_cookie;
>> ...
>> };
>>
>> static int
>> dev_attach(device_t device)
>>
> #define DEVICE2SOFTC(device) ((struct dev_softc
> *)device_get_softc(device))
>
> static void dev_intr(void *arg);
>
> struct dev_softc {
> ...
> int rid_irq;
> struct resource* res_irq;
> void*intr_cookie;
> ...
> };
>
> static int
> dev_attach(device_t device)
> {
> ...
>
>
Sorry, I forgot to indicate the theme.
>Hello.
>Help me please to understand how the function bus_teardown_intr() works.
>I have a device driver containing following code:
>
>#define DEVICE2SOFTC(device) ((struct dev_softc *)device_get_softc(device))
>
>static void dev_intr(void *arg);
>
>struct de
Hello.
Help me please to understand how the function bus_teardown_intr() works.
I have a device driver containing following code:
#define DEVICE2SOFTC(device) ((struct dev_softc *)device_get_softc(device))
static void dev_intr(void *arg);
struct dev_softc {
...
int rid_irq;
struct resource
14 matches
Mail list logo