Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 28 Jun 2011 15:32:31 +0000 (17:32 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 28 Jun 2011 15:32:31 +0000 (17:32 +0200)
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/gras_config.h.in
doc/Doxyfile.in
include/xbt/dynar.h
src/simix/smx_context.c

index b7772b5..910082a 100644 (file)
@@ -3,12 +3,18 @@ ${CMAKE_MODULE_PATH}
 ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
 )
 
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") #Intel processor 64 bits
    message(STATUS "System processor: amd64")
    set(HAVE_RAWCTX 1)
    
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") #Intel processor 32 bits
+   message(STATUS "System processor: x86")
+   set(PROCESSOR_i686 1)
+   set(HAVE_RAWCTX 1)
+   
 ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
     IF(${ARCH_32_BITS})
+        set(PROCESSOR_i686 1)
         message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
     ELSE(${ARCH_32_BITS})
         message(STATUS "System processor: amd64")
@@ -214,7 +220,7 @@ if(pthread)
                if(HAVE_SEM_OPEN_run)
                        set(HAVE_SEM_OPEN 0)
                else(HAVE_SEM_OPEN_run)
-                       exec_program("./testprog" RETURN_VALUE HAVE_SEM_OPEN_run2)
+                       exec_program("./testprog" RETURN_VALUE HAVE_SEM_OPEN_run2 OUTPUT_VARIABLE var_compil)
                        if(HAVE_SEM_OPEN_run2)
                                set(HAVE_SEM_OPEN 0)
                        else(HAVE_SEM_OPEN_run2)
@@ -231,7 +237,7 @@ if(pthread)
                if(HAVE_SEM_INIT_run)
                        set(HAVE_SEM_INIT 0)
                else(HAVE_SEM_INIT_run)
-                       exec_program("./testprog" RETURN_VALUE HAVE_SEM_INIT_run)
+                       exec_program("./testprog" RETURN_VALUE HAVE_SEM_INIT_run OUTPUT_VARIABLE var_compil)
                        if(HAVE_SEM_INIT_run)
                                set(HAVE_SEM_INIT 0)
                        else(HAVE_SEM_INIT_run)
@@ -795,8 +801,8 @@ else("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
        configure_file(${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml COPYONLY)
        configure_file(${CMAKE_HOME_DIRECTORY}/examples/msg/tracing/platform.xml ${CMAKE_BINARY_DIR}/examples/msg/tracing/platform.xml COPYONLY)
        
-       set(generate_files_to_clean
-               ${generate_files_to_clean}
+       set(generated_files_to_clean
+               ${generated_files_to_clean}
                ${CMAKE_BINARY_DIR}/examples/smpi/hostfile
                ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml
                ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml
@@ -805,7 +811,7 @@ else("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
 endif("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
 
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-"${generate_files_to_clean}")
+"${generated_files_to_clean}")
 
 
 IF(${ARCH_32_BITS})
index 32496ee..c58ef93 100644 (file)
 #cmakedefine PROCESSOR_i686 @PROCESSOR_i686@
 #cmakedefine PROCESSOR_x86_64 @PROCESSOR_x86_64@
 #cmakedefine CMAKE_SYSTEM_PROCESSOR @CMAKE_SYSTEM_PROCESSOR@
+#cmakedefine HAVE_RAWCTX @HAVE_RAWCTX@
 
 /* Defined if arrays in struct can straddle struct alignment boundaries. This
    is like than the structure compaction above, but this time, the argument to
index 255096d..ee1b029 100644 (file)
@@ -1512,7 +1512,8 @@ INCLUDE_FILE_PATTERNS  =
 
 PREDEFINED             = DOXYGEN \
                          DOXYGEN_SKIP_IT \
-                         XBT_PUBLIC=
+                         XBT_PUBLIC= \
+                         XBT_INLINE=
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 # this tag can be used to specify a list of macro names that should be expanded.
index 210efb7..67418d1 100644 (file)
@@ -69,13 +69,7 @@ XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new_sync(const unsigned long elm_size,
 XBT_INLINE XBT_PUBLIC(void) xbt_dynar_free(xbt_dynar_t * dynar);
 XBT_PUBLIC(void) xbt_dynar_free_voidp(void *dynar);
 XBT_PUBLIC(void) xbt_dynar_free_container(xbt_dynar_t * dynar);
-
-XBT_INLINE XBT_PUBLIC(unsigned long) xbt_dynar_length(const xbt_dynar_t
-                                                      dynar);
-XBT_INLINE XBT_PUBLIC(int) xbt_dynar_is_empty(const xbt_dynar_t dynar);
-XBT_PUBLIC(void) xbt_dynar_reset(xbt_dynar_t const dynar);
 XBT_PUBLIC(void) xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
-
 XBT_PUBLIC(void) xbt_dynar_dump(xbt_dynar_t dynar);
 
 /** @} */
@@ -108,6 +102,19 @@ XBT_INLINE XBT_PUBLIC(int) xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2,
                                        int(*compar)(const void *, const void *));
 XBT_INLINE XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
 
+/** @} */
+/** @defgroup XBT_dynar_misc Dynar miscellaneous functions
+ *  @ingroup XBT_dynar
+ *
+ *  @{
+ */
+
+XBT_INLINE XBT_PUBLIC(unsigned long) xbt_dynar_length(const xbt_dynar_t
+                                                      dynar);
+XBT_INLINE XBT_PUBLIC(int) xbt_dynar_is_empty(const xbt_dynar_t dynar);
+XBT_PUBLIC(void) xbt_dynar_reset(xbt_dynar_t const dynar);
+
+
 /** @} */
 /** @defgroup XBT_dynar_perl Perl-like use of dynars
  *  @ingroup XBT_dynar
index ca29ef5..9fc1b5d 100644 (file)
@@ -43,15 +43,17 @@ void SIMIX_context_mod_init(void)
     }
     else { /* use the factory specified by --cfg=contexts/factory:value */
 
-      if (smx_context_factory_name == NULL) {
+    if (smx_context_factory_name == NULL) {
         /* use the default factory */
-#ifdef CONTEXT_UCONTEXT
-        SIMIX_ctx_sysv_factory_init(&simix_global->context_factory);
-#else
-        SIMIX_ctx_thread_factory_init(&simix_global->context_factory);
-#endif
-      }
-      else if (!strcmp(smx_context_factory_name, "ucontext")) {
+       #ifdef HAVE_RAWCTX
+       SIMIX_ctx_raw_factory_init(&simix_global->context_factory);
+       #elif CONTEXT_UCONTEXT
+               SIMIX_ctx_sysv_factory_init(&simix_global->context_factory);
+       #else
+               SIMIX_ctx_thread_factory_init(&simix_global->context_factory);
+       #endif
+    }
+    else if (!strcmp(smx_context_factory_name, "ucontext")) {
         /* use ucontext */
 #ifdef CONTEXT_UCONTEXT
         SIMIX_ctx_sysv_factory_init(&simix_global->context_factory);