lkml.org 
[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectintegrity of user-space copy
Greetings,

When copying data to/from user-space, we know the operation can sleep. And
interrupt driven events (including timers) can interrupt even a
non-sleeping user-space access, right?

So in general practice, what is the preferred method of transferring data
to user-space if that data is operated on by something like a kernel timer?
For instance, if I have a block of data about 32k in size that is
(potentially) manipulated on timer expiration, what is the best way to
safely copy it to user-space intact? Disabling interrupts is not a good
idea because the user-space access might sleep. Should I simply copy the
data first with interrupts disabled, and then do the transfer?

-bp
--
B. James Phillippe . bryan@terran.org
Software Engineer, WGT Inc. . http://www.terran.org/~bryan



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.026 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site