Thread: is SetSystemTime atomic?

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    188

    is SetSystemTime atomic?

    ? thanks.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    From a programmers perspective, I would say that yes, it is. If two threads try to set the time to different values at any given point, one of them will get its time set, and the other will "loose" its setting of the time because the other thread got there afterwards. It will not set 19:46:32 if one thread tries to set it to 19:31:18 and the other tries to set it to 17:46:32.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Atomic compare and swap.
    By Maz in forum C Programming
    Replies: 3
    Last Post: 04-07-2009, 02:47 PM
  2. Atomic integers & memcpy()
    By rasta_freak in forum C Programming
    Replies: 11
    Last Post: 08-05-2008, 12:08 PM
  3. atomic operation of reference assignment?
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-27-2008, 08:14 AM
  4. Atomic Operations
    By Elysia in forum Windows Programming
    Replies: 27
    Last Post: 03-27-2008, 02:38 AM
  5. Atomic Types
    By miclus in forum C++ Programming
    Replies: 4
    Last Post: 01-01-2004, 08:39 PM