All checks were successful
Build documentation / build-and-deploy (push) Successful in 23s
76 lines
1.7 KiB
C
76 lines
1.7 KiB
C
#include <limits.h>
|
|
#include <m/proc.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <string/string.h>
|
|
|
|
char c = 'a';
|
|
|
|
void app_main (void) {
|
|
/* uintptr_t out_paddr; */
|
|
/* int mem_rid = m_proc_create_resource_mem (16, RV_PRIVATE, &out_paddr); */
|
|
|
|
/* m_proc_map (out_paddr, M_PROC_MAP_BASE, 16, PM_PRESENT | PM_RW | PM_USER); */
|
|
|
|
/* memset ((void*)M_PROC_MAP_BASE, 0, M_PAGE_SIZE * 16); */
|
|
|
|
/* m_proc_unmap (M_PROC_MAP_BASE, 16); */
|
|
|
|
/* m_proc_drop_resource (mem_rid); */
|
|
|
|
/* m_proc_test (); */
|
|
|
|
/* int mutex_rid = m_proc_create_resource_mutex (RV_PRIVATE); */
|
|
|
|
/* m_proc_mutex_lock (mutex_rid); */
|
|
/* m_proc_test (); */
|
|
/* m_proc_mutex_unlock (mutex_rid); */
|
|
|
|
if (c > 'z')
|
|
c = 'a';
|
|
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
m_proc_test (c++);
|
|
|
|
__asm__ volatile ("dupa: nop; nop; nop; jmp dupa");
|
|
/* for (volatile uint64_t i = 0; i < 1000*1000*100; i++); */
|
|
|
|
/* if (c > 'z') */
|
|
/* c = 'a'; */
|
|
|
|
/* m_proc_test ('k'); */
|
|
/* m_proc_test ('l'); */
|
|
/* m_proc_test ('m'); */
|
|
/* m_proc_test ('n'); */
|
|
/* m_proc_test ('o'); */
|
|
/* m_proc_test ('p'); */
|
|
/* m_proc_test ('r'); */
|
|
/* m_proc_test ('s'); */
|
|
/* m_proc_test ('t'); */
|
|
/* m_proc_test ('u'); */
|
|
}
|