IPC now uses void pointers

This commit is contained in:
pjht 2019-03-15 18:53:50 -05:00
parent f2ebc5e31e
commit 7d2a8b0894
3 changed files with 7 additions and 7 deletions

View File

@ -72,11 +72,11 @@ Task* tasking_createTask(void* eip) {
return createTaskKmode(eip,1);
}
void send_msg(uint32_t pid,char* msg) {
void send_msg(uint32_t pid,void* msg) {
for (Task* task=headTask;task!=NULL;task=task->next) {
if (task->pid==pid) {
if (task->msg_store==NULL) {
task->msg_store=malloc(sizeof(char*)*256);
task->msg_store=malloc(sizeof(void*)*256);
task->sender_store=malloc(sizeof(uint32_t)*256);
}
task->msg_store[task->wr]=msg;
@ -89,7 +89,7 @@ void send_msg(uint32_t pid,char* msg) {
}
}
char* get_msg(uint32_t* sender) {
void* get_msg(uint32_t* sender) {
if (!currentTask->msg_store) {
return NULL;
}

View File

@ -7,6 +7,6 @@ void tasking_init();
void tasking_yield();
Task* tasking_createTask(void* eip);
char isPrivleged(uint32_t pid);
void send_msg(uint32_t pid,char* msg);
char* get_msg(uint32_t* sender);
void send_msg(uint32_t pid,void* msg);
void* get_msg(uint32_t* sender);
#endif

View File

@ -6,7 +6,7 @@
void yield();
void createTask(void* task);
char isPrivleged(uint32_t pid);
void send_msg(uint32_t pid,char* msg);
char* get_msg(uint32_t* sender);
void send_msg(uint32_t pid,void* msg);
void* get_msg(uint32_t* sender);
#endif