- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,71 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2006 iptelorg GmbH |
|
3 |
- * |
|
4 |
- * Permission to use, copy, modify, and distribute this software for any |
|
5 |
- * purpose with or without fee is hereby granted, provided that the above |
|
6 |
- * copyright notice and this permission notice appear in all copies. |
|
7 |
- * |
|
8 |
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
9 |
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
10 |
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|
11 |
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
12 |
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
13 |
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
14 |
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
15 |
- */ |
|
16 |
- |
|
17 |
-/** |
|
18 |
- * @defgroup atomic Kamailio atomic operations |
|
19 |
- * @brief Kamailio atomic operations and memory barriers support |
|
20 |
- * |
|
21 |
- * Kamailio atomic operations and memory barriers support for different CPU |
|
22 |
- * architectures implemented in assembler. It also provides some generic |
|
23 |
- * fallback code for architectures not currently supported. |
|
24 |
- */ |
|
25 |
- |
|
26 |
-/** |
|
27 |
- * @file |
|
28 |
- * @brief Common part for all the atomic operations |
|
29 |
- * |
|
30 |
- * Common part for all the atomic operations (atomic_t and common operations) |
|
31 |
- * see atomic_ops.h for more info. |
|
32 |
- * @ingroup atomic |
|
33 |
- */ |
|
34 |
- |
|
35 |
-#ifndef __atomic_common |
|
36 |
-#define __atomic_common |
|
37 |
- |
|
38 |
-/** |
|
39 |
- * @brief atomic_t defined as a struct to easily catch non atomic operations on it. |
|
40 |
- * |
|
41 |
- * atomic_t defined as a struct to easily catch non atomic operations on it, |
|
42 |
- * e.g. atomic_t foo; foo++ will generate a compile error. |
|
43 |
- */ |
|
44 |
-typedef struct{ volatile int val; } atomic_t; |
|
45 |
- |
|
46 |
- |
|
47 |
-/** |
|
48 |
- * @name Atomic load and store operations |
|
49 |
- * Atomic store and load operations are atomic on all cpus, note however that they |
|
50 |
- * don't include memory barriers so if you want to use atomic_{get,set} |
|
51 |
- * to implement mutexes you must use the mb_* versions or explicitely use |
|
52 |
- * the barriers |
|
53 |
- */ |
|
54 |
- |
|
55 |
-/*@{ */ |
|
56 |
- |
|
57 |
-#define atomic_set_int(pvar, i) (*(int*)(pvar)=i) |
|
58 |
-#define atomic_set_long(pvar, i) (*(long*)(pvar)=i) |
|
59 |
-#define atomic_get_int(pvar) (*(int*)(pvar)) |
|
60 |
-#define atomic_get_long(pvar) (*(long*)(pvar)) |
|
61 |
- |
|
62 |
-#define atomic_set(at_var, value) (atomic_set_int(&((at_var)->val), (value))) |
|
63 |
- |
|
64 |
-inline static int atomic_get(atomic_t *v) |
|
65 |
-{ |
|
66 |
- return atomic_get_int(&(v->val)); |
|
67 |
-} |
|
68 |
- |
|
69 |
-/*@} */ |
|
70 |
- |
|
71 |
-#endif |
... | ... |
@@ -15,10 +15,10 @@ |
15 | 15 |
*/ |
16 | 16 |
|
17 | 17 |
/** |
18 |
- * @defgroup atomic SIP-router atomic operations |
|
19 |
- * @brief SIP-router atomic operations and memory barriers support |
|
18 |
+ * @defgroup atomic Kamailio atomic operations |
|
19 |
+ * @brief Kamailio atomic operations and memory barriers support |
|
20 | 20 |
* |
21 |
- * SIP-router atomic operations and memory barriers support for different CPU |
|
21 |
+ * Kamailio atomic operations and memory barriers support for different CPU |
|
22 | 22 |
* architectures implemented in assembler. It also provides some generic |
23 | 23 |
* fallback code for architectures not currently supported. |
24 | 24 |
*/ |
... | ... |
@@ -32,14 +32,6 @@ |
32 | 32 |
* @ingroup atomic |
33 | 33 |
*/ |
34 | 34 |
|
35 |
-/* |
|
36 |
- * History: |
|
37 |
- * -------- |
|
38 |
- * 2006-03-08 created by andrei |
|
39 |
- * 2007-05-13 split from atomic_ops.h (andrei) |
|
40 |
- */ |
|
41 |
- |
|
42 |
- |
|
43 | 35 |
#ifndef __atomic_common |
44 | 36 |
#define __atomic_common |
45 | 37 |
|
... | ... |
@@ -1,6 +1,4 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2006 iptelorg GmbH |
5 | 3 |
* |
6 | 4 |
* Permission to use, copy, modify, and distribute this software for any |
... | ... |
@@ -16,9 +14,22 @@ |
16 | 14 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
17 | 15 |
*/ |
18 | 16 |
|
19 |
-/** @file @brief |
|
20 |
- * common part for all the atomic operations (atomic_t and common operations) |
|
21 |
- * See @ref atomic_ops.h for more info. |
|
17 |
+/** |
|
18 |
+ * @defgroup atomic SIP-router atomic operations |
|
19 |
+ * @brief SIP-router atomic operations and memory barriers support |
|
20 |
+ * |
|
21 |
+ * SIP-router atomic operations and memory barriers support for different CPU |
|
22 |
+ * architectures implemented in assembler. It also provides some generic |
|
23 |
+ * fallback code for architectures not currently supported. |
|
24 |
+ */ |
|
25 |
+ |
|
26 |
+/** |
|
27 |
+ * @file |
|
28 |
+ * @brief Common part for all the atomic operations |
|
29 |
+ * |
|
30 |
+ * Common part for all the atomic operations (atomic_t and common operations) |
|
31 |
+ * see atomic_ops.h for more info. |
|
32 |
+ * @ingroup atomic |
|
22 | 33 |
*/ |
23 | 34 |
|
24 | 35 |
/* |
... | ... |
@@ -27,18 +38,27 @@ |
27 | 38 |
* 2006-03-08 created by andrei |
28 | 39 |
* 2007-05-13 split from atomic_ops.h (andrei) |
29 | 40 |
*/ |
41 |
+ |
|
42 |
+ |
|
30 | 43 |
#ifndef __atomic_common |
31 | 44 |
#define __atomic_common |
32 | 45 |
|
33 |
-/** @brief atomic_t defined as a struct to easily catch non atomic ops. on it, |
|
34 |
- * e.g. atomic_t foo; foo++ will generate a compile error */ |
|
46 |
+/** |
|
47 |
+ * @brief atomic_t defined as a struct to easily catch non atomic operations on it. |
|
48 |
+ * |
|
49 |
+ * atomic_t defined as a struct to easily catch non atomic operations on it, |
|
50 |
+ * e.g. atomic_t foo; foo++ will generate a compile error. |
|
51 |
+ */ |
|
35 | 52 |
typedef struct{ volatile int val; } atomic_t; |
36 | 53 |
|
37 | 54 |
|
38 |
-/** @name AtomicOps store and load operations are atomic on all cpus, note however that they |
|
55 |
+/** |
|
56 |
+ * @name Atomic load and store operations |
|
57 |
+ * Atomic store and load operations are atomic on all cpus, note however that they |
|
39 | 58 |
* don't include memory barriers so if you want to use atomic_{get,set} |
40 | 59 |
* to implement mutexes you must use the mb_* versions or explicitely use |
41 |
- * the barriers */ |
|
60 |
+ * the barriers |
|
61 |
+ */ |
|
42 | 62 |
|
43 | 63 |
/*@{ */ |
44 | 64 |
|
... | ... |
@@ -15,10 +15,12 @@ |
15 | 15 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
16 | 16 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
17 | 17 |
*/ |
18 |
-/* |
|
18 |
+ |
|
19 |
+/** @file @brief |
|
19 | 20 |
* common part for all the atomic operations (atomic_t and common operations) |
20 |
- * See atomic_ops.h for more info. |
|
21 |
+ * See @ref atomic_ops.h for more info. |
|
21 | 22 |
*/ |
23 |
+ |
|
22 | 24 |
/* |
23 | 25 |
* History: |
24 | 26 |
* -------- |
... | ... |
@@ -28,16 +30,18 @@ |
28 | 30 |
#ifndef __atomic_common |
29 | 31 |
#define __atomic_common |
30 | 32 |
|
31 |
-/* atomic_t defined as a struct to easily catch non atomic ops. on it, |
|
33 |
+/** @brief atomic_t defined as a struct to easily catch non atomic ops. on it, |
|
32 | 34 |
* e.g. atomic_t foo; foo++ will generate a compile error */ |
33 | 35 |
typedef struct{ volatile int val; } atomic_t; |
34 | 36 |
|
35 | 37 |
|
36 |
-/* store and load operations are atomic on all cpus, note however that they |
|
38 |
+/** @name AtomicOps store and load operations are atomic on all cpus, note however that they |
|
37 | 39 |
* don't include memory barriers so if you want to use atomic_{get,set} |
38 | 40 |
* to implement mutexes you must use the mb_* versions or explicitely use |
39 | 41 |
* the barriers */ |
40 | 42 |
|
43 |
+/*@{ */ |
|
44 |
+ |
|
41 | 45 |
#define atomic_set_int(pvar, i) (*(int*)(pvar)=i) |
42 | 46 |
#define atomic_set_long(pvar, i) (*(long*)(pvar)=i) |
43 | 47 |
#define atomic_get_int(pvar) (*(int*)(pvar)) |
... | ... |
@@ -50,5 +54,6 @@ inline static int atomic_get(atomic_t *v) |
50 | 54 |
return atomic_get_int(&(v->val)); |
51 | 55 |
} |
52 | 56 |
|
57 |
+/*@} */ |
|
53 | 58 |
|
54 | 59 |
#endif |
... | ... |
@@ -38,10 +38,10 @@ typedef struct{ volatile int val; } atomic_t; |
38 | 38 |
* to implement mutexes you must use the mb_* versions or explicitely use |
39 | 39 |
* the barriers */ |
40 | 40 |
|
41 |
-#define atomic_set_int(pvar, i) (*(pvar)=i) |
|
42 |
-#define atomic_set_long(pvar, i) (*(pvar)=i) |
|
43 |
-#define atomic_get_int(pvar) (*(pvar)) |
|
44 |
-#define atomic_get_long(pvar) (*(pvar)) |
|
41 |
+#define atomic_set_int(pvar, i) (*(int*)(pvar)=i) |
|
42 |
+#define atomic_set_long(pvar, i) (*(long*)(pvar)=i) |
|
43 |
+#define atomic_get_int(pvar) (*(int*)(pvar)) |
|
44 |
+#define atomic_get_long(pvar) (*(long*)(pvar)) |
|
45 | 45 |
|
46 | 46 |
#define atomic_set(at_var, value) (atomic_set_int(&((at_var)->val), (value))) |
47 | 47 |
|
- added membar_eneter_lock() and membar_leave_lock() (to be used only if
creating locks using the atomic ops functions, for more info see atomic_ops.h)
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,54 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2006 iptelorg GmbH |
|
5 |
+ * |
|
6 |
+ * Permission to use, copy, modify, and distribute this software for any |
|
7 |
+ * purpose with or without fee is hereby granted, provided that the above |
|
8 |
+ * copyright notice and this permission notice appear in all copies. |
|
9 |
+ * |
|
10 |
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
11 |
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
12 |
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|
13 |
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
14 |
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
15 |
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
16 |
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
17 |
+ */ |
|
18 |
+/* |
|
19 |
+ * common part for all the atomic operations (atomic_t and common operations) |
|
20 |
+ * See atomic_ops.h for more info. |
|
21 |
+ */ |
|
22 |
+/* |
|
23 |
+ * History: |
|
24 |
+ * -------- |
|
25 |
+ * 2006-03-08 created by andrei |
|
26 |
+ * 2007-05-13 split from atomic_ops.h (andrei) |
|
27 |
+ */ |
|
28 |
+#ifndef __atomic_common |
|
29 |
+#define __atomic_common |
|
30 |
+ |
|
31 |
+/* atomic_t defined as a struct to easily catch non atomic ops. on it, |
|
32 |
+ * e.g. atomic_t foo; foo++ will generate a compile error */ |
|
33 |
+typedef struct{ volatile int val; } atomic_t; |
|
34 |
+ |
|
35 |
+ |
|
36 |
+/* store and load operations are atomic on all cpus, note however that they |
|
37 |
+ * don't include memory barriers so if you want to use atomic_{get,set} |
|
38 |
+ * to implement mutexes you must use the mb_* versions or explicitely use |
|
39 |
+ * the barriers */ |
|
40 |
+ |
|
41 |
+#define atomic_set_int(pvar, i) (*(pvar)=i) |
|
42 |
+#define atomic_set_long(pvar, i) (*(pvar)=i) |
|
43 |
+#define atomic_get_int(pvar) (*(pvar)) |
|
44 |
+#define atomic_get_long(pvar) (*(pvar)) |
|
45 |
+ |
|
46 |
+#define atomic_set(at_var, value) (atomic_set_int(&((at_var)->val), (value))) |
|
47 |
+ |
|
48 |
+inline static int atomic_get(atomic_t *v) |
|
49 |
+{ |
|
50 |
+ return atomic_get_int(&(v->val)); |
|
51 |
+} |
|
52 |
+ |
|
53 |
+ |
|
54 |
+#endif |