Merge "update userguide alignment"
[samplevnf.git] / common / VIL / l2l3_stack / tsx.h
1 /*
2 // Copyright (c) 2017 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 #ifndef _TSX_H_
17 #define _RSX_H_
18 #include <rte_atomic.h>
19
20 #ifndef TRUE
21 #define TRUE 1
22 #endif
23
24 #ifndef FALSE
25 #define FALSE 0
26 #endif
27
28 volatile int mutex_val;
29
30 rte_atomic64_t naborted;
31
32 void hle_init(void);
33 int hle_lock(void);
34 int hle_release(void);
35 int is_hle_locked(void);
36
37 void rtm_init(void);
38 int rtm_lock(void);
39 int rtm_unlock(void);
40 int is_rtm_locked(void);
41
42 int can_use_intel_core_4th_gen_features(void);
43
44 #endif