OpenCores
URL https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.swp.api/] [openmcapi/] [1.0/] [include/] [linux/] [mgc_mcapi_impl_os.h] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
/*
2
 * Copyright (c) 2011, Mentor Graphics Corporation
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of the <ORGANIZATION> nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
 * POSSIBILITY OF SUCH DAMAGE.
28
 */
29
 
30
 
31
#ifndef MCAPI_OS_LINUX_H
32
#define MCAPI_OS_LINUX_H
33
 
34
#include <stdint.h>
35
#include <pthread.h>
36
 
37
/* XXX include these directly from files that actually need them */
38
#include <string.h>
39
#include <unistd.h>
40
 
41
/********************* Porting Section **************************/
42
 
43
/* This type must match across all reachable nodes in the system.
44
 * This type is used within the MCAPI_BUFFER data structure to represent
45
 * data pointers in that structure.  Since the MCAPI_BUFFER structure
46
 * is shared across reachable nodes, this type must be consistent.
47
 */
48
typedef uint32_t      MCAPI_POINTER;
49
 
50
typedef pthread_cond_t      mcapi_cond_t;
51
typedef pthread_mutex_t     MCAPI_MUTEX;
52
typedef pthread_t           MCAPI_THREAD;
53
 
54
#define MCAPI_THREAD_ENTRY(f)       void *f(void *argv)
55
#define MCAPI_THREAD_PTR_ENTRY(f)   void *(*f)(void *argv)
56
 
57
/********************* End Porting Section **********************/
58
 
59
extern MCAPI_MUTEX          MCAPI_RX_Lock;
60
 
61
#endif  /* MCAPI_OS_LINUX_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.