vm_types_linux32.h

来自「C__ code For Audio Coding」· C头文件 代码 · 共 67 行

H
67
字号
/* /////////////////////////////////////////////////////////////////////////////
//
//                  INTEL CORPORATION PROPRIETARY INFORMATION
//     This software is supplied under the terms of a license agreement or
//     nondisclosure agreement with Intel Corporation and may not be copied
//     or disclosed except in accordance with the terms of that agreement.
//          Copyright(c) 2003-2004 Intel Corporation. All Rights Reserved.
//
//     Cross-architecture support tool. 
//     Linux types header. 
*/
#ifdef LINUX32

#ifdef __cplusplus
extern "C" {
#endif

typedef unsigned long vm_var32;
typedef unsigned long long vm_var64;
typedef char vm_char;

#define VM_ALIGN_DECL(X,Y) Y __attribute__ ((aligned(X)))

#include <pthread.h>
#include <sys/types.h>
#include <semaphore.h>

/* vm_thread.h */
typedef struct {
	pthread_t handle;
	int is_valid;
} vm_thread;

/* vm_event.h */
typedef struct {
	pthread_cond_t cond;
	pthread_mutex_t mutex;
	int manual;
	int state;
} vm_event;

/* vm_mmap.h */
typedef struct {
	int    fd;
	void  *address;
	size_t sizet;
} vm_mmap;

/* vm_mutex.h */
typedef struct {
	pthread_mutex_t handle;
	int is_valid;
} vm_mutex;

/* vm_semaphore.h */
typedef struct {
    pthread_cond_t cond;
    pthread_mutex_t mutex;
    int count;
} vm_semaphore;

#ifdef __cplusplus
};
#endif

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?