CPU skeleton.
This commit is contained in:
@@ -15,6 +15,7 @@ int xenia_info(int argc, xechar_t **argv) {
|
||||
|
||||
xe_pal_ref pal = NULL;
|
||||
xe_memory_ref memory = NULL;
|
||||
xe_cpu_ref cpu = NULL;
|
||||
xe_kernel_ref kernel = NULL;
|
||||
xe_module_ref module = NULL;
|
||||
|
||||
@@ -26,16 +27,23 @@ int xenia_info(int argc, xechar_t **argv) {
|
||||
const xechar_t *path = argv[1];
|
||||
|
||||
xe_pal_options_t pal_options;
|
||||
xe_zero_struct(&pal_options, sizeof(pal_options));
|
||||
pal = xe_pal_create(pal_options);
|
||||
XEEXPECTNOTNULL(pal);
|
||||
|
||||
xe_memory_options_t memory_options;
|
||||
xe_zero_struct(&memory_options, sizeof(memory_options));
|
||||
memory = xe_memory_create(pal, memory_options);
|
||||
XEEXPECTNOTNULL(memory);
|
||||
|
||||
xe_cpu_options_t cpu_options;
|
||||
xe_zero_struct(&cpu_options, sizeof(cpu_options));
|
||||
cpu = xe_cpu_create(pal, memory, cpu_options);
|
||||
XEEXPECTNOTNULL(cpu);
|
||||
|
||||
xe_kernel_options_t kernel_options;
|
||||
xe_zero_struct(&kernel_options, sizeof(kernel_options));
|
||||
kernel = xe_kernel_create(pal, memory, kernel_options);
|
||||
kernel = xe_kernel_create(pal, cpu, kernel_options);
|
||||
XEEXPECTNOTNULL(kernel);
|
||||
|
||||
module = xe_kernel_load_module(kernel, path);
|
||||
@@ -47,6 +55,7 @@ int xenia_info(int argc, xechar_t **argv) {
|
||||
XECLEANUP:
|
||||
xe_module_release(module);
|
||||
xe_kernel_release(kernel);
|
||||
xe_cpu_release(cpu);
|
||||
xe_memory_release(memory);
|
||||
xe_pal_release(pal);
|
||||
return result_code;
|
||||
|
||||
Reference in New Issue
Block a user