Browse code

core, lib, modules: restructured source code tree

- 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)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-/* 
2
- * Copyright (C) 2007 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
- * \file
19
- * \brief Kamailio core ::  bit scan operations, see bit_scan.h.
20
- * \ingroup core
21
- * Module: \ref core
22
- */
23
-
24
-
25
-#include "bit_scan.h"
26
-
27
-unsigned char _debruijn_hash32[32]={0, 1, 2, 6, 3, 11, 7, 16, 4, 14, 12, 21, 8,
28
-	23, 17, 26, 31, 5, 10, 15, 13, 20, 22, 25, 30, 9, 19, 24, 29, 18, 28, 27 };
29
-
30
-unsigned char _debruijn_hash64[64]={0, 1, 2, 7, 3, 13, 8, 19, 4, 25, 14, 28, 9,
31
-	34, 20, 40, 5, 17, 26, 38, 15, 46, 29, 48, 10, 31, 35, 54, 21, 50, 41, 57,
32
-	63, 6, 12, 18, 24, 27, 33, 39, 16, 37, 45, 47, 30, 53, 49, 56, 62, 11, 23,
33
-	32, 36, 44, 52, 55, 61, 22, 43, 51, 60, 42, 59, 58 };
34
-
Browse code

core Update headers, change "SIP-router" to "Kamailio", update doxygen file headers

Olle E. Johansson authored on 03/01/2015 14:15:58
Showing 1 changed files
... ...
@@ -16,7 +16,7 @@
16 16
 
17 17
 /*!
18 18
  * \file
19
- * \brief SIP-router core ::  bit scan operations, see bit_scan.h.
19
+ * \brief Kamailio core ::  bit scan operations, see bit_scan.h.
20 20
  * \ingroup core
21 21
  * Module: \ref core
22 22
  */
Browse code

Core Removed history, svn $id$ and doxygen udpates on the .c files

Olle E. Johansson authored on 03/01/2015 09:53:17
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /* 
2
- * $Id$
3
- * 
4 2
  * Copyright (C) 2007 iptelorg GmbH
5 3
  *
6 4
  * Permission to use, copy, modify, and distribute this software for any
... ...
@@ -15,17 +13,10 @@
15 13
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 14
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 15
  */
18
-/*
19
- *  bit scan operations, see bit_scan.h.
20
- */
21
-/* 
22
- * History:
23
- * --------
24
- *  2007-06-23  created by andrei
25
- */
16
+
26 17
 /*!
27 18
  * \file
28
- * \brief SIP-router core :: 
19
+ * \brief SIP-router core ::  bit scan operations, see bit_scan.h.
29 20
  * \ingroup core
30 21
  * Module: \ref core
31 22
  */
Browse code

Adding doxygen template to all core .c files

Please fill in after the :: to explain the function of this file.

oej authored on 10/10/2009 13:54:13
Showing 1 changed files
... ...
@@ -23,6 +23,13 @@
23 23
  * --------
24 24
  *  2007-06-23  created by andrei
25 25
  */
26
+/*!
27
+ * \file
28
+ * \brief SIP-router core :: 
29
+ * \ingroup core
30
+ * Module: \ref core
31
+ */
32
+
26 33
 
27 34
 #include "bit_scan.h"
28 35
 
Browse code

- switched to unsigned char for the debruijn hash (now the entire lookup table fits into one cacheline; minor performance improvements can be seen on pentiumM and sparc64)

Andrei Pelinescu-Onciul authored on 26/06/2007 13:32:54
Showing 1 changed files
... ...
@@ -26,10 +26,10 @@
26 26
 
27 27
 #include "bit_scan.h"
28 28
 
29
-int _debruijn_hash32[32]={0, 1, 2, 6, 3, 11, 7, 16, 4, 14, 12, 21, 8,
29
+unsigned char _debruijn_hash32[32]={0, 1, 2, 6, 3, 11, 7, 16, 4, 14, 12, 21, 8,
30 30
 	23, 17, 26, 31, 5, 10, 15, 13, 20, 22, 25, 30, 9, 19, 24, 29, 18, 28, 27 };
31 31
 
32
-int _debruijn_hash64[64]={0, 1, 2, 7, 3, 13, 8, 19, 4, 25, 14, 28, 9,
32
+unsigned char _debruijn_hash64[64]={0, 1, 2, 7, 3, 13, 8, 19, 4, 25, 14, 28, 9,
33 33
 	34, 20, 40, 5, 17, 26, 38, 15, 46, 29, 48, 10, 31, 35, 54, 21, 50, 41, 57,
34 34
 	63, 6, 12, 18, 24, 27, 33, 39, 16, 37, 45, 47, 30, 53, 49, 56, 62, 11, 23,
35 35
 	32, 36, 44, 52, 55, 61, 22, 43, 51, 60, 42, 59, 58 };
Browse code

- added functions to get the index of the first or last bit set in a 32 bit or 64 bit int: bit_scan_forward32(), bit_scan_forward64(), bit_scan_reverse32(), bit_scan_reverse64(), bit_scan_forward(long) and bit_scan_reverse(long). All of them are very fast, they use asm if available (for now only for __CPU_x86 and __CPU_x86_64), and fall back to a de Bruijn based method or binary search (depending on which method was faster in my measurements on a particular cpu). - added test/profile.h - simple measure the cpu cycles between two calls functions (for now support for x86, x86_64 and sparc64)

Andrei Pelinescu-Onciul authored on 25/06/2007 17:20:34
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+/* 
2
+ * $Id$
3
+ * 
4
+ * Copyright (C) 2007 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
+ *  bit scan operations, see bit_scan.h.
20
+ */
21
+/* 
22
+ * History:
23
+ * --------
24
+ *  2007-06-23  created by andrei
25
+ */
26
+
27
+#include "bit_scan.h"
28
+
29
+int _debruijn_hash32[32]={0, 1, 2, 6, 3, 11, 7, 16, 4, 14, 12, 21, 8,
30
+	23, 17, 26, 31, 5, 10, 15, 13, 20, 22, 25, 30, 9, 19, 24, 29, 18, 28, 27 };
31
+
32
+int _debruijn_hash64[64]={0, 1, 2, 7, 3, 13, 8, 19, 4, 25, 14, 28, 9,
33
+	34, 20, 40, 5, 17, 26, 38, 15, 46, 29, 48, 10, 31, 35, 54, 21, 50, 41, 57,
34
+	63, 6, 12, 18, 24, 27, 33, 39, 16, 37, 45, 47, 30, 53, 49, 56, 62, 11, 23,
35
+	32, 36, 44, 52, 55, 61, 22, 43, 51, 60, 42, 59, 58 };
36
+