git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode - Changed install dir to $(DISTROOT)/$(ARCH) for cross-installs
[tpg/acess2.git]
/
Kernel
/
messages.c
diff --git
a/Kernel/messages.c
b/Kernel/messages.c
index
03e225b
..
ce23d6b
100644
(file)
--- a/
Kernel/messages.c
+++ b/
Kernel/messages.c
@@
-2,8
+2,10
@@
* AcessOS Microkernel Version
* messages.c
*/
* AcessOS Microkernel Version
* messages.c
*/
+#define DEBUG 1
#include <acess.h>
#include <threads.h>
#include <acess.h>
#include <threads.h>
+#include <threads_int.h>
#include <errno.h>
// === IMPORTS ===
#include <errno.h>
// === IMPORTS ===
@@
-23,18
+25,18
@@
int Proc_SendMessage(Uint *Err, Uint Dest, int Length, void *Data)
tThread *thread;
tMsg *msg;
tThread *thread;
tMsg *msg;
-
Log("Proc_SendMessage: (Err=%p, Dest=%i, Length=%i, Data=%p)
", Err, Dest, Length, Data);
+
ENTER("pErr iDest iLength pData
", Err, Dest, Length, Data);
if(Length <= 0 || !Data) {
*Err = -EINVAL;
if(Length <= 0 || !Data) {
*Err = -EINVAL;
-
return -1
;
+
LEAVE_RET('i', -1)
;
}
// Get thread
thread = Threads_GetThread( Dest );
// Error check
}
// Get thread
thread = Threads_GetThread( Dest );
// Error check
- if(!thread)
{ return -1; }
+ if(!thread)
LEAVE_RET('i', -1);
// Get Spinlock
SHORTLOCK( &thread->IsLocked );
// Get Spinlock
SHORTLOCK( &thread->IsLocked );
@@
-42,7
+44,7
@@
int Proc_SendMessage(Uint *Err, Uint Dest, int Length, void *Data)
// Check if thread is still alive
if(thread->Status == THREAD_STAT_DEAD) {
SHORTREL( &thread->IsLocked );
// Check if thread is still alive
if(thread->Status == THREAD_STAT_DEAD) {
SHORTREL( &thread->IsLocked );
-
return -1
;
+
LEAVE_RET('i', -1)
;
}
// Create message
}
// Create message
@@
-67,7
+69,7
@@
int Proc_SendMessage(Uint *Err, Uint Dest, int Length, void *Data)
Threads_Wake( thread );
SHORTREL(&glThreadListLock);
Threads_Wake( thread );
SHORTREL(&glThreadListLock);
-
return 0
;
+
LEAVE_RET('i', 0)
;
}
/**
}
/**
UCC
git Repository :: git.ucc.asn.au