Race between WdfTimerStart and WdfTimerStop.

Hi, 
My driver has a WDF timer object. The EvtTimerFunc of the timer object calls WdfTimerStart after it finishes processing whatever it needs to. 
Now, i have another thread which calls WdfTimerStop with the wait parameter set to TRUE. 
What happens in the following two scenarios ?
Scenario 1:
EvtTimerFunc: Gets swapped out. 
Other Thread: Calls WdfTimerStop(timer, TRUE); goes into wait state ?
EvtTimerFunc: wakes up, calls WdfTimerStart again. 
In this case will the timer start up again ? Will WdfTimerStop returns as soon as the EvtTimerFunc returns despite having called WdfTimerStart ?
Scenario 2: 
EvtTimerFunc: does what it needs to, calls WdfTimerStart and has still not completed.
Other Thread: Calls WdfTimerStop(timer, TRUE);
EvtTimerFunc: Completes/Returns.
Will WdfTimerStop return only after another EvtTimerFunc call back is executed ?
I assume such use cases are common and the simplest solution would be to check on some sort of flag before restarting the timer in the EvtTimerFunc call back.
Any help appreciated.
Thanks.
-R___K

Forgot about github!
These new opensource times. yep. Use the source.
It looks like the framework will not allow the timer call back function to restart the timer if WdfStopTimer has been called with the wait flag set to TRUE.
They have a kind of "pattern" there, known as rundown (or rundown protection?). It marks a thing as stopping and waits until it has actually stopped. While in the stopping state, attempts to add new work to it will be denied. After the rundown
on the thing ends, it may be reused again.
This is what Doron answered you for (1): after rundown for stop() completes, start() will work again.
-- pa

Similar Messages

  • Difference between scalable and failover cluster

    Difference between scalable and fail over cluster

    A scalable cluster is usually associated with HPC clusters but some might argue that Oracle RAC is this type of cluster. Where the workload can be divided up and sent to many compute nodes. Usually used for a vectored workload.
    A failover cluster is where a standby system or systems are available to take the workload when needed. Usually used for scalar workloads.

  • Can I use a Photoshop CS6 guide book I got in college to learn CC, or is there too many differences between CS6 and CC?

    I have a guide book I got in college to help me learn Photoshop CS6, but I never finished the class. My question is: Can I use this book to learn Photoshop CC or is there too much diversity between CS6 and CC?

    caj50932876 wrote:
    Thanks! I appreciate you answering so quickly!
    That's OK.  We race to be the first responder, because we are sad geeks, and first responder sounds like something from a TV reality program.  Benjamin actually has flashing lights and a siren on his computer.

  • Looking for new laptop what are the differences between pro and air? Besides size. Does the air preform like the pro?

    Looking for new laptop what are the differences between pro and air? Besides size. Does the air preform like the pro?

    The NEW macbook Pro and Air are EXTREMELY close in form factor
    The newest macbook Pro is essentially a larger macbook Air with Retina display and options for speed in increasing prices up to an independent graphics and quad core processor.
    both Air and new Pro now have PCIe SSD and permanent RAM.
    The Air is the lightweight portable form factor, fast to boot and shut down, but with longer battery life than any of the macbook pro in 13"
    Now the new macbook Pro and macbook Air are extremely close in form factor and nature.
    both have 802ac wifi
    both have permanent RAM, no superdrive
    both are slim profiles and SSD
    The only real differences now are (in the most expensive Pros) faster processors and quadcore processors and top end model autonomous graphics.
    ....and of course the retina display
    both are now "very good for travel"
    Other than features the form factor of the Air and Pro are VERY close now,....so now its merely a matter of features and price more than anything.
    You need an external HD regardless of what you get for backups etc.   Drop into an Apple store and handle both and make your choice based on features, such as Retina or non-retina, .... both at a distance now look like the same computer.
    The Pro weighs more, ....but nowhere near what it used to just a month ago on the older macbook Pros
    The NEW macbook Pro is a different creature entirely than the older macbook Pro, .....the new Pro is thicker than the Air, but id frankly call the NEWEST Pro a "macbook Air with Retina display" , or
    Maybe a “macbook Air PRO with Retina display” 
    Instead of Air VS Pro now,.....its really a smooth transition from Air to pro without comparing say, 2 different creatures, now its like contrasting a horse from a race horse.
    Either one in 8gig of RAM (preferably)... the 4gig upgrade costs very little,  the I7 you will notice only 15% faster on heavy applications over the I5, and NOTHING on most APPS.....I5 has longer battery life.
    As you see below, the non-Retina 13" AIR is 82% of the Macbook with Retina display in resolution
    there is no magical number of pixels per inch that automatically equates to Retina quality.
    http://www.cultofmac.com/168509/why-you-might-be-disappointed-by-the-resolution- of-those-new-retina-display-macs-feature/
    A huge internal SSD isnt a game changer for anything, you need an external HD anyway
    what you WONT READ on Apple.com etc. is that the larger SSD  are MUCH FASTER due to SSD density
    "The 512GB Samsung SSD found in our 13-inch model offers roughly a 400MB/s increase in write speeds over the 128GB SanDisk/Marvell SSD"
    http://blog.macsales.com/19008-performance-testing-not-all-2013-macbook-air-ssds -are-the-same
    Here is an excellent video comparison between the 11” I5 vs. I7 2013 Macbook Air.
    http://www.youtube.com/watch?v=oDqJ-on03z4
    http://www.anandtech.com/show/7113/2013-macbook-air-core-i5-4250u-vs-core-i7-465 0u/2
    I5 vs. I7 performance 13” Macbook Air 2013
    Boot performance
    11.7 I5 ……11.4 I7
      Cinebench 
    1.1 I5….1.41 I7
    IMovie Import and Opt.
    6.69 I5….5.35 I7
      IMovie Export 
    10.33 I5…8.20 I7
    Final Cut Pro X
    21.47 I5…17.71 I7
      Adobe Lightroom 3 Export 
    25.8 I5….31.8 I7
    Adobe Photoshop CS5 Performance
    27.3 I5…22.6 I7
    Reviews of the newest Retina 2013 Macbook Pro
    13”
    Digital Trends (13") - http://www.digitaltrends.com/laptop-...h-2013-review/
    LaptopMag (13") - http://www.laptopmag.com/reviews/lap...play-2013.aspx
    Engadget (13") - http://www.engadget.com/2013/10/29/m...-13-inch-2013/
    The Verge (13") - http://www.theverge.com/2013/10/30/5...ay-review-2013
    CNet (13") - http://www.cnet.com/laptops/apple-ma...-35831098.html
    15”
    The Verge (15") - http://www.theverge.com/2013/10/24/5...w-15-inch-2013
    LaptopMag (15") - http://www.laptopmag.com/reviews/lap...inch-2013.aspx
    TechCrunch (15") - http://techcrunch.com/2013/10/25/lat...ok-pro-review/
    CNet (15") - http://www.cnet.com/apple-macbook-pro-with-retina-2013/
    PC Mag (15") - http://www.pcmag.com/article2/0,2817,2426359,00.asp
    Arstechnica (15") - http://arstechnica.com/apple/2013/10...-pro-reviewed/
    Slashgear (15") - http://www.slashgear.com/macbook-pro...2013-26303163/

  • What is the difference between ntp and ctssd ?

    hello everyone
    could you please describe the difference between ntp and ctssd? which one should be used?
    thanks
    John

    ntp is OS level service which synchronize the system clock with a remote server over the Network Time Protocol (NTP).
    CSSD  oracle  processes (Cluster Services Synchronization Daemon) monitor the health of RAC nodes employing two distinct heart beats: Network heart beat and Disk heart beat. Healthy nodes will have continuous network and disk heartbeats exchanged between the nodes.

  • Shared classes between webapplication and ejb

    Hello,
    If I have some java classes that are used by both WebApplication and EJB, do
    I have to include those classes into both war and jar files?
    Regards,
    Peter

    Yes accorinding to WLS Documentation
    --Naggi
    "Programming today is a race between software engineers
    striving to build bigger and better idiot-proof programs, and the universe
    trying to build bigger and better idiots.
    So far, the universe is winning."
    "Peter Tsang" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hello,
    If I have some java classes that are used by both WebApplication and EJB,do
    I have to include those classes into both war and jar files?
    Regards,
    Peter

  • Automated Switching between 0 and 1

    Hi,
    Anyone know how to inter switch my output between 0 and 1 simulataneously? For example, high speed frequency switching to make two pointers seem working simulataneously. 
    Best Regards,
    Scott

    Sena_Scott wrote:Thank you for your reply. It works well. However, i realize as my processor speed is moving at high speed. This high speed switching is too fast that before my case 0 work is done, it is already switch to case 1 hence both cases are not done as the speed is too fast that the programme does not register the change. Is it possible for me to add in a timer so that the switching only changes every 10 iteration of a while loop? I saw this Vi named watchdog timer but not sure if this was the right one though. 
    That sounds like you have a race condition.  Writing to a local variable?  If so, you might want to use a queue instead.
    Yes, you could keep a counter.  I do that all the time.  Just store it in a shift register.  Each iteration you increment and use the Quotient & Remainder function to get the remainder of the counter and the number of iterations you want.  Then do a comparison with 0.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Difference between Null and null?

    What is the difference between null and NULL?
    When is each used?
    Thanks,

    veryConfused wrote:
    There is a null in java, but no NULL. null means no value. However, when assigning value, the following is different:Although the empty String has no special role. Null means, the referential type is not assigned (doesn't refer) to a specific object. The empty String is just another object though, so seeing it or pointing it out as something special when it actually isn't at all (no more special than new Integer(0) or new Object[0]) just adds to the confusion.

  • 7344 servo motion switching between open and closed loop operation

    I have a custom end-of-line test system presently using a 4-axis 7344 servo controller to perform various functional tests on small, brushed DC motors. The system is programmed in C/C++ and uses flex motion functions to control the motor during testing. Motors are coupled to external encoder feedback and third party PWM drives running in closed-loop torque mode from an analog command signal. The system uses all four motion axis channels on the 7344 board to independently and asynchronously test up to four production motors at a time.
    In closed-loop mode, the system runs without issue, satisfying the battery of testing protocols executed by this system. I now have a request to add additional test functionality to the system. This testing must be run in open loop mode. Specifically, I need to use my +/- 10v analog output command to my torque drive to send different DAC output levels to the connected motor.drive while monitoring response.
    I do not believe the flex motion library or 7344 controller includes functions to easily switch between open and closed loop mode without sending a new drive configuration. I am also under the impression that I cannot reconfigure one (or more) servo controller axis channels without disabling the entire drive. As my system runs each axis channel in an asynchronous manner, any requirement to shutdown all drives each time I change modes is an unworkable solution.
    I am open to all ideas that will allow asynchronous operation of my 4 motor testing stations. If the only solution is to add a second 7344 controller and mechanical relays to switch the drive and motor wiring between two separately configured servo channels, so be it. I just want to explore any available avenue before I place a price tag on this new system requirement.
    Bob

    Jochen,
    Thank you for the quick response. The 7344 board does an excellent job running my manufacturing motor assemblies through a custom end-of-line tester in closed loop mode. A portion of the performance history and test result couples the motor through a mechanical load and external shaft. The shaft is in contact with a linear encoder that closes my servo loop.
    My new manufacturing requirement is to also sample/document how the small DC motor behaves in open loop operation. Your solution is exactly what I need to perform the additional functional tests on the product I am manufacturing. I see no reason why this cannot work. I was originally concerned that I would need to reinitialize the 7344 board after changing axis configuration. Initialization is a global event and impacts all four channels on the 7344 board.
    Using flex_config_axis() to change axis configuration on a single channel without disturbing other potentially running axis channels will solve my concern. It will be several weeks before I can return to the manufacturing facility where the 7344-based testing machine is located. I will update this thread once I verify a successful result.
    Bob

  • Differentiating between open and closed invoices

    Hi all
           I am using a database view of tables VBRK and VRKPA  for fetching invoice list based on the customer number. Can I use  'VBRK-RFBSK = C' to differentiate between closed  and open invoices?  If not is there any other field i can use from this particular view for the same.
    Thanks

    Hi Asim,
    Yes, you are absolutely right. This field give you the exact result like which billing dcoument is open and which is closed.
    Regards,
    MT

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

  • Difference between GUI_UPLOAD and WS_UPLOAD

    Hi,
    Please make me clear about the difference between GUI_UPLOAD and WS_UPLOAD. In which cases we need to use these modules...??
    Thanks,
    Satish

    I would suggest to always use the GUI_UPLOAD.  I say this because this is the function module which is used in the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.   Really, you should probably use the class/method instead of the function module.
      data: filename type string.
      filename = p_file.
      call method cl_gui_frontend_services=>gui_upload
             exporting
                  filename                = filename
                  filetype                = 'ASC'
             changing
                  data_tab                = iflatf
             exceptions
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  no_authority            = 6
                  unknown_error           = 7
                  bad_data_format         = 8
                  unknown_dp_error        = 12
                  access_denied           = 13
                  others                  = 17.
    Regards,
    Rich Heilman

  • I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    Cannot see what files ? Music (synced music should appear in the iPod app), films/TV shows (Videos app), documents ... ?

  • Difference between char and varchar, also the difference between varchar2

    Hi,
    Can anyone explain me the difference between char and varchar, and also the difference between varchar and varchar2...

    Varchar2 is variable width character data type, so if you define column with width 20 and insert only one character to tis column only, one character will be stored in database. Char is not variable width so when you define column with width 20 and insert one character to this column it will be right padded with 19 spaces to desired length, so you will store 20 characters in the dattabase (follow the example 1). Varchar data type from Oracle 9i is automaticlly promoted to varchar2 (follow example 2)
    Example 1:
    SQL> create table tchar(text1 char(10), text2 varchar2(10))
    2 /
    Table created.
    SQL> insert into tchar values('krystian','krystian')
    2 /
    1 row created.
    SQL> select text1, length(text1), text2, length(text2)
    2 from tchar
    3 /
    TEXT1 LENGTH(TEXT1) TEXT2 LENGTH(TEXT2)
    krystian 10 krystian 8
    Example 2:
    create table tvarchar(text varchar(10))
    SQL> select table_name,column_name,data_type
    2 from user_tab_columns
    3 where table_name = 'TVARCHAR'
    4 /
    TABLE_NAME COLUMN_NAME DATA_TYPE
    TVARCHAR TEXT VARCHAR2
    Best Regards
    Krystian Zieja / mob

  • The difference between Lion and Mountain Lion

    Can some one explain to me the difference between Lion and Mtn Lion? I'm currently 10.6.8 Is it beneficiall for me to upgrade?

    Mountain Lion is an enhanced version of previous OS X and so that is Mavericks.
    About upgrading it all depends on what your needs are and if your hardware supports it.
    System requirements for OS X Lion
    System requirements for OS X Mountain Lion
    OS X Mavericks: System Requirements
    Please check also applications compatibility. From Lion onward, you cannot run PPC application.

Maybe you are looking for

  • Windows Home XP - "iTunes has encountered a problem and needs to close"

    Hello : I just updated to iTunes 7.7.0.43 for Windows Home XP. The earlier version was working just fine. But last week I downloaded the update and although the program works fine, every time that I exit from this application I get an error message "

  • Applications missing from EAS and can't see designated HBR on forms in workspace

    Hi! Just finished patching our EPM system; 11.1.2.1.600: Oracle Hyperion EPM Workspace, HSS and Planning, fusion edition. 11.1.2.1.103: EAS After installing the patches the systems were up and running and everything was just fine until yesterday arou

  • How to create a proxy in sap crm

    Hi All, To access an external webservice, i need to create a client proxy in sap crm. Can anyone suggest me the steps in creating a proxy and wht are the pre-requisites for creating a proxy. Whn am creating a proxy, getting an error as ERROR in HTTP

  • Jsp:plugin applet code

    Hi all, I've been wondering if applets can be dynamically called from a jsp or servlet using strings in the applet code section. would this be good if a database was used to store the paths of the applets? i've tried this with a small applet in diffe

  • K8T Master 2 with 2 x 250's

    HI guys, i am at my witts end. I have got a K8T master 2 2 x opteron 250's 4 x Hynix PC3200 512 ECC-Reg dims (2GB) When i turn the blighter on i just get 1 long beep (which repeats). I have had the CPU's checked by AMD and have had the board replaced