2 * Copyright (C) 2010 NXP Semiconductors
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 * \file phOsalNfc_Common.h
\r
20 * Project: NFC FRI / OSAL
\r
22 * $Workfile:: phOsalNfc_Common.h $
\r
24 * $Author: frq09147 $
\r
29 #ifndef PHOSALNFC_COMMON_H
\r
30 #define PHOSALNFC_COMMON_H
\r
34 #include <pthread.h>
\r
35 #include <semaphore.h>
\r
36 #include <signal.h>
\r
37 #include <sys/time.h>
\r
38 #include <sys/sem.h>
\r
40 #define MAX_MESSAGE_SIZE 256
\r
42 typedef enum phOsalNfc_eHandleType
\r
44 phOsalNfc_eHandleTypeInvalid = 0,
\r
45 phOsalNfc_eHandleTypeThread = 1,
\r
46 phOsalNfc_eHandleTypeSemaphore = 2,
\r
48 }phOsalNfc_eHandleType_t;
\r
50 typedef struct phOsalNfc_sMsg
\r
52 phOsalNfc_Message_t Msg;
\r
53 uint32_t sourceID; /* pthread_t = unsigned long int */
\r
54 struct phOsalNfc_sMsg *nextMsg;
\r
57 typedef struct phOsalNfc_sOsalHandle
\r
59 phOsalNfc_eHandleType_t HandleType;
\r
61 pphOsalNfc_ThreadFunction_t pThreadFunction;
\r
69 struct sembuf semBuf;
\r
72 phOsalNfc_sMsg_t *pMsg;
\r
74 struct phOsalNfc_sOsalHandle *nextThread;
\r
75 } phOsalNfc_sOsalHandle_t;
\r
78 #endif /* PHOSALNFC_COMMON_H */
\r