Re: [PATCH 1/1] Blackfin OTP Char Driver: add writing support of OTP



On 10/13/2008 12:07 PM, Mike Frysinger wrote:
the pos gets updated every time a half-page gets processed. so if you
call write() and tell it to write 128 bytes, but you get an error half
way through, the pos points right at the place where the error
occurred. i dont get what you're asking.

Ah, OK, that's because I don't know exactly what should happen if a write fails.
I though userspace expects the state of the fd to not be touched.

But is this OK to you:
PROCESS 1 PROCESS 2
lock
set allow_writes
write
check allow_writes
be interrupted
whatever
unlock
unset allow_writes
sleep
mutex lock
the processing...

i dont see a problem here. there is no loss of data, hardware
failure, software crashes, etc... in other words, there is no
misbehavior.

I see no purpose of allow_writes then. Why is it there? I don't need to call
memlock if anybody else did and I raced with him. Also when somebody else
unlocks after finishing of writes I can start failing in the middle of my writes
-- this doesn't have anything to do with locking, but with the design, the one
global variable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • RE: Disable other field in form
    ... if you know VB syntax (I dont) then you could loop through the controls ... > select name first then unlock other 4 fields. ... > screen and lock it. ...
    (microsoft.public.access.forms)
  • Re: Need Advices
    ... Wow, Pete is a psychic! ... The first thing I will say to you is that I have no bias as i dont work ... tell you they dont lock or they will unlock the panel for free... ... I plan to install an alarm in my future house and I need some advices to ...
    (alt.security.alarms)
  • Re: Need Advices
    ... The first thing I will say to you is that I have no bias as i dont work anymore as a technician in that business since the first of october 2007 ... If you live in a region where poeple are attacked while at home, think about a full blown security system with contact on all windows/door and passive infrared detector so that you can arm the system while at home, if you live in a smooth area, or dont feel like having the system arm at night, some pasive infrared and contact on doors will be enough. ... also buy your system and dont sign for a long term contract and ask what is the cancelling procedure..and ask them what is there politic on panel locking and if they will charge you to unlock it at the end of the contract if they do lock there panel have them write the politic on the contact in case they tell you they dont lock or they will unlock the panel for free... ...
    (alt.security.alarms)
  • Re: PC Locked
    ... paulineindoors ... shows a dialogue box which says, "Your pc is locked, to ... unlock it" etc etc. ... Well I dont have a password, as its only me who uses pc, so ...
    (microsoft.public.windowsxp.general)

Loading