2008/7/19 Dan Hipschman <[EMAIL PROTECTED]>:
> +static void CALLBACK timer_queue_cb2(PVOID p, BOOLEAN timedOut)
> +{
> +    struct timer_queue_data1 *d = (struct timer_queue_data1 *) p;
> +    ok(timedOut, "Timer callbacks should always time out\n");
> +    /* Wait until our own timer handle is set to avoid a pretty much
> +       impossible race condition (better safe than sorry).  */
> +    if (d->t)
> +        if (++d->num_calls == d->max_calls)

You could change the above two lines to just "if (d->t &&
++d->num_calls == d->max_calls)" and remove a level of indentation.

> +        {
> +            BOOL ret;
> +            SetLastError(0xdeadbeef);
> +            /* Note, XP SP2 does *not* do any deadlock checking, so passing
> +               INVALID_HANDLE_VALUE here will just hang.  */
> +            ret = pDeleteTimerQueueTimer(d->q, d->t, NULL);
> +            ok(!ret, "DeleteTimerQueueTimer\n");
> +            todo_wine
> +            ok(GetLastError() == ERROR_IO_PENDING, 
> "DeleteTimerQueueTimer\n");
> +        }
> +}
> +
> +static void CALLBACK timer_queue_cb3(PVOID p, BOOLEAN timedOut)
> +{
> +    struct timer_queue_data1 *d = (struct timer_queue_data1 *) p;
> +    ok(timedOut, "Timer callbacks should always time out\n");
> +    /* Wait until our own timer handle is set to avoid a pretty much
> +       impossible race condition (better safe than sorry).  */
> +    if (d->t)
> +        if (++d->num_calls == d->max_calls)

Ditto.

> +        {
> +            /* Basically kill the timer since it won't have time to run
> +               again.  */
> +            BOOL ret = pChangeTimerQueueTimer(d->q, d->t, 10000, 0);
> +            ok(ret, "ChangeTimerQueueTimer\n");
> +        }
> +}
> +

-- 
Rob Shearman


Reply via email to