S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_threads.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
29#ifndef SOPC_THREADS_H_
30#define SOPC_THREADS_H_
31
32#include <stddef.h>
33
34#include "sopc_enums.h"
35#include "sopc_mutexes.h"
36
37/*****************************************************************************
38 * Abstract interface types
39 *****************************************************************************/
40
50#define SOPC_INVALID_THREAD NULL
51
52/*****************************************************************************
53 * Platform-dependant functions interfaces
54 *****************************************************************************/
72 void* (*startFct)(void*),
73 void* startArgs,
74 const char* taskName);
75
104 void* (*startFct)(void*),
105 void* startArgs,
106 int priority,
107 const char* taskName);
108
120
126void SOPC_Sleep(unsigned int milliseconds);
127
128#endif /* SOPC_THREADS_H_ */
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
void SOPC_Sleep(unsigned int milliseconds)
Suspend current thread execution for (at least) a millisecond interval.
SOPC_ReturnStatus SOPC_Thread_Create(SOPC_Thread *thread, void *(*startFct)(void *), void *startArgs, const char *taskName)
Function to create a thread.
SOPC_ReturnStatus SOPC_Thread_CreatePrioritized(SOPC_Thread *thread, void *(*startFct)(void *), void *startArgs, int priority, const char *taskName)
Function to create a high priority thread.
SOPC_ReturnStatus SOPC_Thread_Join(SOPC_Thread *thread)
Function to wait for a thread to terminate.
SOPC_Thread_Impl * SOPC_Thread
Definition sopc_threads.h:49
Definition p_sopc_threads.h:42
SOPCThreadStartFct * startFct
Definition p_sopc_threads.h:45
pthread_t thread
Definition p_sopc_threads.h:43