lkml.org 
[lkml]   [2001]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: copy to user
Luis Henriques--

Before making my suggestion: Apologies to the list if this has already
been settled. I'm trying to catch up on my LKML reading, and I'm only
up to Nov 20 so far...

Anyway: Here's what I'd do, if I had to do such a apalling thing 8^)

Drop a function in your code something like:

_xyzzy:
db 0x18, 0xfe ; jr $

Then, when you detect the condition where you want to waste time, then
put the address of this function on top of the user stack (along with
whatever else in the stack frame is required) so that the code just sits
there burning CPU. To clean it up, you'd simply restore the original
stack frame to the process.

It's hideous & gross, but if you need it.....

--marco


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

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