S2OPC OPCUA Toolkit
sopc_atomic.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 
26 #ifndef SOPC_ATOMIC_H_
27 #define SOPC_ATOMIC_H_
28 
29 #include <stdint.h>
30 
38 int32_t SOPC_Atomic_Int_Get(int32_t* atomic);
39 
46 void SOPC_Atomic_Int_Set(int32_t* atomic, int32_t val);
47 
56 int32_t SOPC_Atomic_Int_Add(int32_t* atomic, int32_t val);
57 
65 void* SOPC_Atomic_Ptr_Get(void** atomic);
66 
73 void SOPC_Atomic_Ptr_Set(void** atomic, void* val);
74 
75 #endif // SOPC_ATOMIC_H_
SOPC_Atomic_Int_Get
int32_t SOPC_Atomic_Int_Get(int32_t *atomic)
Returns the current value of an atomic integer variable.
SOPC_Atomic_Ptr_Set
void SOPC_Atomic_Ptr_Set(void **atomic, void *val)
Sets the value of an atomic pointer variable.
SOPC_Atomic_Int_Add
int32_t SOPC_Atomic_Int_Add(int32_t *atomic, int32_t val)
Adds a value to an atomic integer variable.
SOPC_Atomic_Int_Set
void SOPC_Atomic_Int_Set(int32_t *atomic, int32_t val)
Sets the value of an atomic integer variable.
SOPC_Atomic_Ptr_Get
void * SOPC_Atomic_Ptr_Get(void **atomic)
Returns the current value of an atomic pointer.