Re: Suspend in critical code
- From: "Michael Schaffner, P.E." <mschaffner@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Nov 2005 10:41:49 -0500
Check the power manager documentation in CE help. There may be some IOCTL's
that your driver can implement that are called by the power manager when it
wants to change states. I have never tried this, so I don't know how well it
works.
When the system begins a suspend, the PowerDown function of your drivers is
called. The system is single threaded at this point. Therefore, if there is
something you want to wait upon within a particular power function of a the
pertinent driver, then you can wait for that to occur and the system won't
power down until you return from the power function. But keep in mind you
are single-thread, so you must be able to monitor whatever you need to
within the current thread of execution.
--
Michael Schaffner, P.E.
Senior Software Engineer
Windows CE Technical Group
Applied Data Systems
"fd" <demo@xxxxxxxx> wrote in message
news:eGXiHDU4FHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
>I would like to know if a mechanism exist in CE 5.0 to be sure that some
>critical executing code is terminated before a suspend occurs.
>
> For example, take a flash driver doing a critical write or read access
> that needs to be completed executed before going in suspend mode.
>
> I saw this problem when I was executing RW_ALL test on my Nand flash
> driver. I then force a suspend during the test and with some debugging
> code I saw a suspend inside my critical code.
>
> I know that RW_ALL use DeviceIOControl to do the test, but maybe some
> Database will do the same and it will result with data corruption.
>
>
>
> Any Idea How to fix this suspend behavior?
>
>
>
>
.
- Follow-Ups:
- Re: Suspend in critical code
- From: fd
- Re: Suspend in critical code
- Prev by Date: TouchCalibrate()
- Next by Date: Re: TouchCalibrate()
- Previous by thread: Re: Suspend in critical code
- Next by thread: Re: Suspend in critical code
- Index(es):
Relevant Pages
|