~ubuntu-branches/ubuntu/oneiric/osptoolkit/oneiric

« back to all changes in this revision

Viewing changes to include/osp/ospmsgque.h

  • Committer: Bazaar Package Importer
  • Author(s): TransNexus, Inc.
  • Date: 2007-12-30 20:37:26 UTC
  • Revision ID: james.westby@ubuntu.com-20071230203726-dysah2e93yqd3vbp
Tags: upstream-3.4.2
ImportĀ upstreamĀ versionĀ 3.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
*** COPYRIGHT (c) 2002 by TransNexus, Inc.                              ***
 
3
***                                                                     ***
 
4
*** This software is property of TransNexus, Inc.                       ***
 
5
*** This software is freely available under license from TransNexus.    ***
 
6
*** The license terms and conditions for free use of this software by   ***
 
7
*** third parties are defined in the OSP Toolkit Software License       ***
 
8
*** Agreement (LICENSE.txt).  Any use of this software by third         ***
 
9
*** parties, which does not comply with the terms and conditions of the ***
 
10
*** OSP Toolkit Software License Agreement is prohibited without        ***
 
11
*** the prior, express, written consent of TransNexus, Inc.             ***
 
12
***                                                                     ***
 
13
*** Thank you for using the OSP ToolKit(TM).  Please report any bugs,   ***
 
14
*** suggestions or feedback to support@transnexus.com                   ***
 
15
***                                                                     ***
 
16
**************************************************************************/
 
17
 
 
18
 
 
19
 
 
20
 
 
21
 
 
22
 
 
23
 
 
24
/*
 
25
 * ospmsgque.h - Structures and prototypes for message queue object.
 
26
 */
 
27
#ifndef _OSPMSGQUE_H
 
28
#define _OSPMSGQUE_H
 
29
 
 
30
#include "osp/osp.h"
 
31
#include "osp/ospmsginfo.h"
 
32
 
 
33
#define OSPPMsgQueueGetCondVar(ospvMsgQueue)   (ospvMsgQueue)->CondVar
 
34
 
 
35
/*-------------------------------------------*/
 
36
/* message queue typedef                     */
 
37
/*-------------------------------------------*/ 
 
38
typedef struct _OSPTMSGQUEUE
 
39
{
 
40
    unsigned            NumberOfTransactions;
 
41
    OSPTMUTEX           Mutex;
 
42
    OSPTCONDVAR         CondVar;
 
43
    OSPTMSGINFO         *MsgInfoList;
 
44
} OSPTMSGQUEUE;
 
45
 
 
46
#ifdef __cplusplus
 
47
extern "C" 
 
48
{
 
49
#endif
 
50
 
 
51
    int  OSPPMsgQueueNew(OSPTMSGQUEUE **);
 
52
    void OSPPMsgQueueDelete(OSPTMSGQUEUE **);
 
53
    int  OSPPMsgQueueAddTransaction(OSPTMSGQUEUE *, OSPTMSGINFO *);
 
54
    void OSPPMsgQueueIncrementNumberOfTransactions(OSPTMSGQUEUE *);
 
55
    void OSPPMsgQueueDecrementNumberOfTransactions(OSPTMSGQUEUE *);
 
56
    int  OSPPMsgQueueGetNumberOfTransactions(OSPTMSGQUEUE *, unsigned *);
 
57
 
 
58
#ifdef __cplusplus
 
59
}
 
60
#endif
 
61
 
 
62
#endif