graphicscomposition/openwfcompositionengine/adaptation/include/owfmessagequeue.h
branchRCL_3
changeset 163 bbf46f59e123
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
150:57c618273d5c 163:bbf46f59e123
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
    30 
    31 
    31 #ifdef __cplusplus
    32 #ifdef __cplusplus
    32 extern "C" {
    33 extern "C" {
    33 #endif
    34 #endif
    34 
    35 
       
    36 #define WAIT_FOREVER            -1
       
    37 #define MSG_QUEUE_WAIT_MSG_FETCHED      0
       
    38 #define MSG_QUEUE_WAIT_MSG_ERR          -1
       
    39 #define MSG_QUEUE_WAIT_MSG_TIMEDOUT     -2
       
    40 #define MSG_QUEUE_INIT_OK               0
       
    41 #define MSG_QUEUE_INIT_ERR              -1
       
    42 
    35 
    43 
    36 typedef struct {
    44 typedef struct {
    37     OWFuint                 id;
    45     OWFuint                 id;
    38     void*                   data;
    46     void*                   data;
    39 } OWF_MESSAGE;
    47 } OWF_MESSAGE;
    40 
    48 
    41 typedef struct _MSGQUE {
    49 typedef struct _MSGQUE {
    42     OWFint                  read;
    50     void*                   queuePtr;
    43     OWFint                  write;
       
    44 } OWF_MESSAGE_QUEUE;
    51 } OWF_MESSAGE_QUEUE;
    45 
    52 
    46 /*
    53 /*
    47  *  Destroy message queue
    54  *  Destroy message queue
    48  *
    55  *