More naming convention fixes

This commit is contained in:
pjht 2020-07-29 08:09:53 -05:00
parent 870f26d5e9
commit dda2885fd9
4 changed files with 13 additions and 13 deletions

View File

@ -89,7 +89,7 @@ char load_proc(size_t datapos,char* initrd) {
}
copy_data(address_space,ptr,pheader.memsz,(void*)pheader.vaddr);
}
createProc((void*)header.entry,address_space);
create_proc((void*)header.entry,address_space);
}
return 1;
}
@ -122,7 +122,7 @@ char load_proc(size_t datapos,char* initrd) {
// }
// copy_data(address_space,ptr,pheader.memsz,(void*)pheader.vaddr);
// }
// createProc((void*)header.entry,address_space);
// create_proc((void*)header.entry,address_space);
// }
// return 1;
// }
@ -136,7 +136,7 @@ int main() {
serial_print("IN INIT\n");
pthread_t thread;
pthread_create(&thread,NULL,thread_func,NULL);
blockThread(THREAD_BLOCKED);
block_thread(THREAD_BLOCKED);
for (int i=0;i<5;i++) {
serial_print("YIELDING\n");
yield();

View File

@ -114,11 +114,11 @@ void kmain(struct multiboot_boot_header_tag* hdr) {
}
copy_data(address_space,ptr,pheader.memsz,(void*)pheader.vaddr);
}
createProc((void*)header.entry,address_space);
create_proc((void*)header.entry,address_space);
for (int i=0;i<4;i++) {
yield();
}
unblockThread(1,0);
unblock_thread(1,0);
for (int i=0;i<4;i++) {
yield();
}

View File

@ -12,14 +12,14 @@ void yield() {
"::"b"(0));
}
void createProc(void* start,void* address_space) {
void create_proc(void* start,void* address_space) {
asm volatile(" \
mov $" QU(SYSCALL_CREATEPROC) ", %%eax; \
int $80; \
"::"b"(start),"d"(0),"c"(address_space));
}
void createProcParam(void* start,void* address_space,void* param1,void* param2) {
void create_proc_param(void* start,void* address_space,void* param1,void* param2) {
asm volatile(" \
mov $" QU(SYSCALL_CREATEPROC) ", %%eax; \
int $80; \
@ -36,14 +36,14 @@ __attribute__((noreturn)) void exit(int code) {
}
void blockThread(thread_state state) {
void block_thread(thread_state state) {
asm volatile(" \
mov $" QU(SYSCALL_BLOCK) ", %%eax; \
int $80; \
"::"b"(state));
}
void unblockThread(pid_t pid,pid_t tid) {
void unblock_thread(pid_t pid,pid_t tid) {
asm volatile(" \
mov $" QU(SYSCALL_UNBLOCK) ", %%eax; \
int $80; \

View File

@ -31,7 +31,7 @@ void yield();
* \param start The start function of the process
* \param address_space The address space of the process
*/
void createProc(void* start,void* address_space);
void create_proc(void* start,void* address_space);
/**
* Create a process with 2 arguments
* \param start The start function of the process
@ -39,18 +39,18 @@ void createProc(void* start,void* address_space);
* \param param1 The first parameter of the process
* \param param2 The second parameter of the process
*/
void createProcParam(void* start,void* address_space,void* param1,void* param2);
void create_proc_param(void* start,void* address_space,void* param1,void* param2);
/**
* Block the current thread
* \param state The state to block it with
*/
void blockThread(thread_state state);
void block_thread(thread_state state);
/**
* Unblock a thread in a process
* \param pid The PID of the thread's process
* \param tid The TID of the thread
*/
void unblockThread(pid_t pid,pid_t tid);
void unblock_thread(pid_t pid,pid_t tid);
#endif