Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 1995 01:22:14 -0800 (PST)
From:      Julian Elischer <julian@ref.tfs.com>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        hackers@freebsd.org
Subject:   Re: more device driver question 8)
Message-ID:  <199511290922.BAA01693@ref.tfs.com>
In-Reply-To: <199511290350.DAA10336@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 29, 95 03:50:42 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> Ok, and another one 8)
> 
> Driver read routine sets up buffers, etc.
> Driver enables interrupts on peripheral.
>   Peripheral immediately interrupts, may satisfy whole read request.
> Driver goes to sleep waiting for read request to be satsified.
> ...
> 
> I can't see how to avoid this race; I'm sure it must be possible, but 
> browsing other drivers yields no immediate inspiration.
> Some sleep at raised interrupt level:
> 
> spltty()
> 	tsleep(...)
> splx()
> 
> Does this imply that tsleep() restores the base interrupt level while
> it's running?
exactly,
It schedules another process, which will be at some OTHER
interrupt priority level, it does it 'atomicly' too..

> 
> Because the peripheral's data rate is entirely dependant on an external 
> source, it's impossible to know how fast or slow it will be 8(
> 
> -- 
> ]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
> ]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
> ]] High-speed data acquisition and      (GSM mobile) 041-122-496        [[
> ]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
> ]] "Who does BSD?" "We do Chucky, we do."                               [[
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511290922.BAA01693>