]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
allocate thread stacks with bmk_platform_allocpg2()
authorAntti Kantee <pooka@iki.fi>
Sun, 19 Apr 2015 13:49:28 +0000 (13:49 +0000)
committerAntti Kantee <pooka@iki.fi>
Sun, 19 Apr 2015 13:49:28 +0000 (13:49 +0000)
platform/baremetal/sched.c
platform/xen/xen/sched.c

index 3f3780ca60b0d01ee8dbed31fe8a8e8c0c8885f7..84523eb29c7fe0f67baca38376081f71c9926a83 100644 (file)
@@ -139,7 +139,7 @@ static void
 stackalloc(void **stack, unsigned long *ss)
 {
 
-       *stack = bmk_xmalloc(BMK_THREAD_STACKSIZE);
+       *stack = bmk_platform_allocpg2(BMK_THREAD_STACK_PAGE_ORDER);
        *ss = BMK_THREAD_STACKSIZE;
 }
 
@@ -147,7 +147,7 @@ static void
 stackfree(struct bmk_thread *thread)
 {
 
-       bmk_memfree(thread->bt_stackbase);
+       bmk_platform_freepg2(thread->bt_stackbase, BMK_THREAD_STACK_PAGE_ORDER);
 }
 
 static void
index f581b96806f7d0c5cfb24e51561523b84b4aa833..217de5a7119136c6e07748404814905ec782a51b 100644 (file)
@@ -140,7 +140,7 @@ static void
 stackalloc(void **stack, unsigned long *ss)
 {
 
-       *stack = (void *)minios_alloc_pages(STACK_SIZE_PAGE_ORDER);
+       *stack = bmk_platform_allocpg2(STACK_SIZE_PAGE_ORDER);
        *ss = STACK_SIZE;
 }
 
@@ -148,7 +148,7 @@ static void
 stackfree(struct bmk_thread *thread)
 {
 
-       minios_free_pages(thread->bt_stackbase, STACK_SIZE_PAGE_ORDER);
+       bmk_platform_freepg2(thread->bt_stackbase, STACK_SIZE_PAGE_ORDER);
 }
 
 void