From: liang_mike Date: Wed, 4 Feb 2009 20:10:11 +0000 (+0000) Subject: Add tosthread_join support to TinyLD X-Git-Tag: rc_6_tinyos_2_1_1~504 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=2f9879fac80f0453c020df4ea76076bcf0c3a36e Add tosthread_join support to TinyLD Fix a typo in README --- diff --git a/apps/tosthreads/tinyld/LoadFromRAM/README b/apps/tosthreads/tinyld/LoadFromRAM/README index cda23b74..b0adfb58 100644 --- a/apps/tosthreads/tinyld/LoadFromRAM/README +++ b/apps/tosthreads/tinyld/LoadFromRAM/README @@ -8,4 +8,4 @@ programs hardcoded in the byte arrays; One program is Blink, and the other one is Basestation. If you would like to generate your own loadable program: - tosthread-gen-dynamic-app ../../capps/Blink/Blink.c + tosthreads-gen-dynamic-app ../../capps/Blink/Blink.c diff --git a/apps/tosthreads/tinyld/SerialLoader/README b/apps/tosthreads/tinyld/SerialLoader/README index ded93534..ab7ee1da 100644 --- a/apps/tosthreads/tinyld/SerialLoader/README +++ b/apps/tosthreads/tinyld/SerialLoader/README @@ -12,7 +12,7 @@ Here are the steps: make telosb install bsl, 2.) Create the loadable code, Blink.tos: - tosthread-gen-dynamic-app ../../capps/Blink/Blink.c + tosthreads-gen-dynamic-app ../../capps/Blink/Blink.c 3.) Clear the byte array in the mote RAM buffer: ./serialloader.py 0 diff --git a/tools/tinyos/tosthreads/tosthreads-gen-dynamic-app b/tools/tinyos/tosthreads/tosthreads-gen-dynamic-app index 5f6abc29..dcd1d972 100755 --- a/tools/tinyos/tosthreads/tosthreads-gen-dynamic-app +++ b/tools/tinyos/tosthreads/tosthreads-gen-dynamic-app @@ -1,5 +1,27 @@ #!/bin/bash +# Copyright (c) 2008 Johns Hopkins University. +# All rights reserved. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation for any purpose, without fee, and without written +# agreement is hereby granted, provided that the above copyright +# notice, the (updated) modification history and the author appear in +# all copies of this source code. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA, +# OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +# THE POSSIBILITY OF SUCH DAMAGE. + +# @author Chieh-Jan Mike Liang + if [ $# -ne 1 -a $# -ne 2 ] then echo "Usage: `basename $0` path_to_cthread_app [options]" diff --git a/tools/tinyos/tosthreads/tosthreads_standard_api.py b/tools/tinyos/tosthreads/tosthreads_standard_api.py index ec29b0e5..aa573743 100644 --- a/tools/tinyos/tosthreads/tosthreads_standard_api.py +++ b/tools/tinyos/tosthreads/tosthreads_standard_api.py @@ -89,5 +89,7 @@ map_extfun = { "getLeds":107, "setLeds":108, - "__divmodhi4":109} + "__divmodhi4":109, + + "tosthread_join":110} diff --git a/tools/tinyos/tosthreads/tosthreads_tenet_api.py b/tools/tinyos/tosthreads/tosthreads_tenet_api.py index 500bdfd7..6c57daf1 100644 --- a/tools/tinyos/tosthreads/tosthreads_tenet_api.py +++ b/tools/tinyos/tosthreads/tosthreads_tenet_api.py @@ -54,6 +54,6 @@ map_extfun = { "read_tsr_sensor":33, "read_par_sensor":34, "read_temperature":35, "read_humidity":36, - "__divmodhi4":36 + "__divmodhi4":37 } diff --git a/tos/lib/tosthreads/lib/tinyld/tosthread_slcs_types.h b/tos/lib/tosthreads/lib/tinyld/tosthread_slcs_types.h index 3bf38b57..2d07c225 100755 --- a/tos/lib/tosthreads/lib/tinyld/tosthread_slcs_types.h +++ b/tos/lib/tosthreads/lib/tinyld/tosthread_slcs_types.h @@ -106,7 +106,9 @@ struct addr fun[] = { {getLeds}, {setLeds}, - {div} + {div}, + + {tosthread_join} }; #endif