/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

 /* Set a zero interval timer. It should fire right away. */
#include <stdio.h> /* For printf */

#include <ios.h>
#include <iostypes.h>
#include <ioslibc.h>

#define STACK_SIZE 4*1024
void
zerotimer(u32 x)
{
    IOSMessage msgQ[8];
    IOSMessageQueueId qid;
    u32 rcvd_msg;
 

    if ( 0 > (qid = IOS_CreateMessageQueue(msgQ, 8))) {
        printf("creating message queue failed: %d\n", qid);
        goto done;
    }
    IOS_CreateTimer(0, 0, qid, 0);
    IOS_ReceiveMessage(qid, (IOSMessage *) &rcvd_msg, IOS_MESSAGE_BLOCK);
    printf("Timer expired. Got msg: %u\n", rcvd_msg);
done:
    IOS_ThreadExit(0);
}
