Re: Trapping writes to mmap'd memory.
- From: "Dave" <godaves@xxxxxxxxx>
- Date: Wed, 03 Oct 2007 19:05:56 GMT
"John Reiser" <jreiser@xxxxxxxxxxxx> wrote in message news:fe0hii0d92@xxxxxxxxxxxxxxxxxxxxx
With code something like that below (obviously not complete): Are any
updates to the buffer _guaranteed_ to happen (assuming correct
single-thread operation)?
Yes, the updates are guaranteed to happen. The hardware sends a fault,
which stops execution before the update, but saves enough state
so that execution can be resumed as if nothing happened. As long as
the handler does not modify the saved state in *ctx, then return from
the signal handler results in resuming execution with the correct
saved state so it appears as if the fault did not happen. In particular,
if the handler does absolutely nothing then the same logical fault
will happen again. (If the initial context saved by the hardware
represents the middle of an instruction, then the replay may give
different details, but it will look the same to the signal handler.)
That is great information -- thank you!
- Dave
.
- References:
- Trapping writes to mmap'd memory.
- From: Dave
- Re: Trapping writes to mmap'd memory.
- From: John Reiser
- Re: Trapping writes to mmap'd memory.
- From: Dave
- Re: Trapping writes to mmap'd memory.
- From: John Reiser
- Trapping writes to mmap'd memory.
- Prev by Date: Re: Trapping writes to mmap'd memory.
- Next by Date: Re: Trapping writes to mmap'd memory.
- Previous by thread: Re: Trapping writes to mmap'd memory.
- Next by thread: How to use the entire harddisk?
- Index(es):
Relevant Pages
|