PERFORCE change 222986 for review
    Robert Watson 
    rwatson at FreeBSD.org
       
    Sun Mar 17 23:08:55 UTC 2013
    
    
  
http://p4web.freebsd.org/@@222986?ac=10
Change 222986 by rwatson at rwatson_cinnamon on 2013/03/17 23:08:18
	Initialise global tesla state when running in the kernel.
Affected files ...
.. //depot/projects/ctsrd/tesla/src/sys/libtesla/store.c#4 edit
Differences ...
==== //depot/projects/ctsrd/tesla/src/sys/libtesla/store.c#4 (text+ko) ====
@@ -46,6 +46,20 @@
 
 static void	tesla_class_acquire(tesla_class*);
 
+#ifdef _KERNEL
+static void
+tesla_global_store_sysinit(__unused void *arg)
+{
+	uint32_t error;
+
+	error = tesla_store_init(&global_store, TESLA_SCOPE_GLOBAL,
+	    TESLA_MAX_CLASSES, TESLA_MAX_INSTANCES);
+	tesla_assert(error == TESLA_SUCCESS, ("tesla_store_init failed"));
+}
+SYSINIT(tesla_global_store, SI_SUB_TESLA, SI_ORDER_FIRST,
+    tesla_global_store_sysinit, NULL);
+#endif
+
 int32_t
 tesla_store_get(uint32_t context, uint32_t classes, uint32_t instances,
                 tesla_store* *storep)
    
    
More information about the p4-projects
mailing list