]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/make/m16c62p/crt.S
Added TosThreads support for Mulle.
[tinyos-2.x.git] / support / make / m16c62p / crt.S
index 6a9cbe9bd67829017c56c8c82987a4cb6a4b0ae2..1665c5f8d8f8955e6fd72986247e3b1ffe23db4d 100755 (executable)
@@ -62,8 +62,11 @@ _start:
 
        /* Setup the FLG register to some sane defaults. */
        ldc             #0, flg
-       fset    u
-       ldc     #_ustack, sp
+  /* Clear the U flag. This sets the stack pointer to the interrupt stack.
+     This is done so that only one stack is used by both interrupt routines
+     and other code. There would else be a problem when threads are changed
+     in interrupt routines in the tosthread library. */
+       fclr u
 
        /* Setup interrupt vector. */
        ldc             #%hi16(_vectors_variable), intbh