[haiku-commits] haiku: hrev47054 - data/develop src/system/kernel

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 25 Mar 2014 23:36:48 +0100 (CET)

hrev47054 adds 2 changesets to branch 'master'
old head: fc00fd8d91ba8be167f88f0e31481529b15d7b6a
new head: bff26905875330ea486e316f9c4279556917bfb5
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=bff2690+%5Efc00fd8

----------------------------------------------------------------------------

d941d6b: Minor cleanup.

bff2690: makefile-engine: fixed build of kernel add-ons.
  
  * Actually, hopefully: not yet tested.
  * Automatic whitespace cleanup.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 60 insertions(+), 58 deletions(-)
data/develop/makefile-engine      |  14 ++---
src/system/kernel/system_info.cpp | 104 +++++++++++++++++-----------------

############################################################################

Commit:      d941d6bac345959f2646af6d1e4fd2f97f4828a3
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d941d6b
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Tue Mar 25 22:32:46 2014 UTC

Minor cleanup.

----------------------------------------------------------------------------

diff --git a/src/system/kernel/system_info.cpp 
b/src/system/kernel/system_info.cpp
index 5fa1664..4308c44 100644
--- a/src/system/kernel/system_info.cpp
+++ b/src/system/kernel/system_info.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2013, Haiku, Inc.
+ * Copyright (c) 2004-2014, Haiku, Inc.
  * Distributed under the terms of the MIT license.
  *
  * Authors:
@@ -406,6 +406,57 @@ 
SystemNotificationService::Listener::OwnerDeleted(AssociatedDataOwner* owner)
 }
 
 
+//     #pragma mark - private functions
+
+
+static void
+count_topology_nodes(const cpu_topology_node* node, uint32& count)
+{
+       count++;
+       for (int32 i = 0; i < node->children_count; i++)
+               count_topology_nodes(node->children[i], count);
+}
+
+
+static int32
+get_logical_processor(const cpu_topology_node* node)
+{
+       while (node->level != CPU_TOPOLOGY_SMT) {
+               ASSERT(node->children_count > 0);
+               node = node->children[0];
+       }
+
+       return node->id;
+}
+
+
+static cpu_topology_node_info*
+generate_topology_array(cpu_topology_node_info* topology,
+       const cpu_topology_node* node, uint32& count)
+{
+       if (count == 0)
+               return topology;
+
+       static const topology_level_type mapTopologyLevels[] = { B_TOPOLOGY_SMT,
+               B_TOPOLOGY_CORE, B_TOPOLOGY_PACKAGE, B_TOPOLOGY_ROOT };
+
+       STATIC_ASSERT(sizeof(mapTopologyLevels) / sizeof(topology_level_type)
+               == CPU_TOPOLOGY_LEVELS + 1);
+
+       topology->id = node->id;
+       topology->level = node->level;
+       topology->type = mapTopologyLevels[node->level];
+
+       arch_fill_topology_node(topology, get_logical_processor(node));
+
+       count--;
+       topology++;
+       for (int32 i = 0; i < node->children_count && count > 0; i++)
+               topology = generate_topology_array(topology, node->children[i], 
count);
+       return topology;
+}
+
+
 //     #pragma mark -
 
 
@@ -459,7 +510,6 @@ get_cpu_info(uint32 firstCPU, uint32 cpuCount, cpu_info* 
info)
 }
 
 
-
 status_t
 system_info_init(struct kernel_args *args)
 {
@@ -531,61 +581,13 @@ _user_get_cpu_info(uint32 firstCPU, uint32 cpuCount, 
cpu_info* userInfo)
 }
 
 
-static void
-count_topology_nodes(const cpu_topology_node* node, uint32& count)
-{
-       count++;
-       for (int32 i = 0; i < node->children_count; i++)
-               count_topology_nodes(node->children[i], count);
-}
-
-
-static int32
-get_logical_processor(const cpu_topology_node* node)
-{
-       while (node->level != CPU_TOPOLOGY_SMT) {
-               ASSERT(node->children_count > 0);
-               node = node->children[0];
-       }
-
-       return node->id;
-}
-
-
-static cpu_topology_node_info*
-generate_topology_array(cpu_topology_node_info* topology,
-       const cpu_topology_node* node, uint32& count)
-{
-       if (count == 0)
-               return topology;
-
-       static const topology_level_type mapTopologyLevels[] = { B_TOPOLOGY_SMT,
-               B_TOPOLOGY_CORE, B_TOPOLOGY_PACKAGE, B_TOPOLOGY_ROOT };
-
-       STATIC_ASSERT(sizeof(mapTopologyLevels) / sizeof(topology_level_type)
-               == CPU_TOPOLOGY_LEVELS + 1);
-
-       topology->id = node->id;
-       topology->level = node->level;
-       topology->type = mapTopologyLevels[node->level];
-
-       arch_fill_topology_node(topology, get_logical_processor(node));
-
-       count--;
-       topology++;
-       for (int32 i = 0; i < node->children_count && count > 0; i++)
-               topology = generate_topology_array(topology, node->children[i], 
count);
-       return topology;
-}
-
-
 status_t
 _user_get_cpu_topology_info(cpu_topology_node_info* topologyInfos,
        uint32* topologyInfoCount)
 {
        if (topologyInfoCount == NULL || !IS_USER_ADDRESS(topologyInfoCount))
                return B_BAD_ADDRESS;
-       
+
        const cpu_topology_node* node = get_cpu_topology();
 
        uint32 count = 0;

############################################################################

Revision:    hrev47054
Commit:      bff26905875330ea486e316f9c4279556917bfb5
URL:         http://cgit.haiku-os.org/haiku/commit/?id=bff2690
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Tue Mar 25 22:35:18 2014 UTC

makefile-engine: fixed build of kernel add-ons.

* Actually, hopefully: not yet tested.
* Automatic whitespace cleanup.

----------------------------------------------------------------------------

diff --git a/data/develop/makefile-engine b/data/develop/makefile-engine
index cf19c7b..06587e3 100644
--- a/data/develop/makefile-engine
+++ b/data/develop/makefile-engine
@@ -2,7 +2,7 @@
 ##     Does all the hard work for the Generic Makefile
 ##     which simply defines the project parameters
 
-##     Supports Generic Makefile v2.0, 2.01, 2.1, 2.2, 2.3, 2.4, 2.5 
+##     Supports Generic Makefile v2.0, 2.01, 2.1, 2.2, 2.3, 2.4, 2.5
 
 #      determine wheather running on x86 or ppc
 MACHINE=$(shell uname -m)
@@ -96,8 +96,8 @@ endif
                LDFLAGS += -shared -Xlinker -soname=$(NAME)
        else
        ifeq ($(strip $(TYPE)), DRIVER)
-               LDFLAGS += -nostdlib /boot/develop/lib/x86/_KERNEL_ \
-                                       
/boot/develop/lib/x86/haiku_version_glue.o
+               LDFLAGS += -nostdlib /boot/system/develop/lib/_KERNEL_ \
+                                       
/boot/system/develop/lib/haiku_version_glue.o
        endif
        endif
        endif
@@ -117,7 +117,7 @@ endif
 #       quotation marks
 ifeq ($(strip $(TYPE)), STATIC)
        TARGET          := $(TARGET_DIR)/$(NAME).a
-else   
+else
        TARGET          := $(TARGET_DIR)/$(NAME)
 endif
 
@@ -154,13 +154,13 @@ ifneq (,$(filter $(CPU),x86 x86_64))
        INCLUDES = $(LOC_INCLUDES)
        INCLUDES += -I-
        INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix -I, 
$(path)))
-       
+
        STDCPPLIBS = stdc++.r4
  else
        INCLUDES = -iquote./
        INCLUDES += $(foreach path, $(SRC_PATHS) $(LOCAL_INCLUDE_PATHS), 
$(addprefix -iquote, $(path)))
        INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix 
-isystem, $(path)))
-       
+
        STDCPPLIBS = stdc++ supc++
  endif
 else
@@ -317,7 +317,7 @@ $(OBJ_DIR)/%.rsrc : %.RDEF
 $(CATALOGS_DIR)/%.catalog : $(CATKEYS_DIR)/%.catkeys
        linkcatkeys -o "$@" -s $(APP_MIME_SIG) -l $(notdir $(basename $@)) $<
 
-# rule to preprocess program sources into file ready for collecting catkeys 
+# rule to preprocess program sources into file ready for collecting catkeys
 $(OBJ_DIR)/$(NAME).pre : $(SRCS)
        -cat $(SRCS) | $(CC) -E -x c++ $(INCLUDES) $(CFLAGS) 
-DB_COLLECTING_CATKEYS - > $(OBJ_DIR)/$(NAME).pre
 


Other related posts:

  • » [haiku-commits] haiku: hrev47054 - data/develop src/system/kernel - axeld