* src/vm/jit/stacktrace.c (stacktrace_get): Changed signature to take
[cacao.git] / src / threads / critical.c
index 5dda6b4c1c4303e3e8adbf3928dd43aaf8593e42..51c331747607de2a01786e409becdde4a68c44ef 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.c 4903 2006-05-11 12:48:43Z edwin $
-
 */
 
 
 #include "config.h"
 
 #include <stddef.h>
+#include <stdint.h>
 
 #include "vm/types.h"
 
@@ -37,8 +36,6 @@
 
 #include "toolbox/avl.h"
 
-#include "vm/jit/asmpart.h"
-
 
 /* the AVL tree containing the critical sections */
 
@@ -47,8 +44,7 @@ static avl_tree_t *criticaltree;
 
 /* prototypes *****************************************************************/
 
-static s4 critical_comparator(const void *treenode, const void *node);
-static void critical_register_asm_critical_sections(void);
+static int critical_comparator(const void *treenode, const void *node);
 
 
 /* critical_init ***************************************************************
@@ -60,8 +56,6 @@ static void critical_register_asm_critical_sections(void);
 void critical_init(void)
 {
     criticaltree = avl_create(&critical_comparator);
-
-       critical_register_asm_critical_sections();
 }
 
 
@@ -78,7 +72,7 @@ void critical_init(void)
 
 *******************************************************************************/
 
-static s4 critical_comparator(const void *treenode, const void *node)
+static int critical_comparator(const void *treenode, const void *node)
 {
        const critical_section_node_t *treecsn;
        const critical_section_node_t *csn;
@@ -160,24 +154,6 @@ u1 *critical_find_restart_point(u1 *pc)
 }
 
 
-/* critical_register_asm_critical_sections *************************************
-
-   Register critical sections defined in the array asm_criticalsections.
-
-*******************************************************************************/
-
-static void critical_register_asm_critical_sections(void)
-{
-       /* XXX TWISTI: this is just a quick hack */
-#if defined(ENABLE_JIT) && defined(ENABLE_THREADS)
-       critical_section_node_t *n = &asm_criticalsections;
-
-       while (n->start)
-               critical_section_register(n++);
-#endif
-}
-
-
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where