diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 21:59:12 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 21:59:12 +0000 |
commit | 6706284921ae317e32f5e391d401f8eaa3d6e3a5 (patch) | |
tree | 24bf36306b92e1b6f6b01c4acdec3e7abeae9f2c | |
parent | 013eef130f1bc2cab1e3f4022d8498fb98bb29bf (diff) | |
download | nuttx-6706284921ae317e32f5e391d401f8eaa3d6e3a5.tar.gz nuttx-6706284921ae317e32f5e391d401f8eaa3d6e3a5.tar.bz2 nuttx-6706284921ae317e32f5e391d401f8eaa3d6e3a5.zip |
Fix z16f addressing issues
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@592 42af7a65-404d-4744-a932-0658087f49c3
37 files changed, 974 insertions, 976 deletions
diff --git a/nuttx/configs/z16f2800100zcog/ostest/ostest.zfpproj b/nuttx/configs/z16f2800100zcog/ostest/ostest.zfpproj index f0dfc3319..ade3d73d4 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/ostest.zfpproj +++ b/nuttx/configs/z16f2800100zcog/ostest/ostest.zfpproj @@ -1,237 +1,238 @@ -<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="c:4.11:07031901"> -<cpu>Z16F2811AL</cpu> - -<!-- file information --> -<files> -<file filter-key="flash">..\..\..\nuttx.hex</file> -</files> - -<!-- configuration information --> -<configurations> -<configuration name="Debug" > -<tools> -<tool name="Assembler"> -<options> -<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option> -<option name="include" type="string" change-action="assemble"></option> -<option name="list" type="boolean" change-action="none">true</option> -<option name="listmac" type="boolean" change-action="none">false</option> -<option name="name" type="boolean" change-action="none">true</option> -<option name="pagelen" type="integer" change-action="none">56</option> -<option name="pagewidth" type="integer" change-action="none">80</option> -<option name="quiet" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="Compiler"> -<options> -<option name="chartype" type="string" change-action="compile">U</option> -<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option> -<option name="genprintf" type="boolean" change-action="compile">true</option> -<option name="keepasm" type="boolean" change-action="none">false</option> -<option name="keeplst" type="boolean" change-action="none">false</option> -<option name="list" type="boolean" change-action="none">false</option> -<option name="listinc" type="boolean" change-action="none">false</option> -<option name="model" type="string" change-action="compile">S</option> -<option name="modsect" type="boolean" change-action="compile">false</option> -<option name="stdinc" type="string" change-action="compile"></option> -<option name="usrinc" type="string" change-action="compile"></option> -<option name="regvar" type="boolean" change-action="compile">true</option> -<option name="regvarcache" type="boolean" change-action="none">false</option> -<option name="reduceopt" type="boolean" change-action="compile">false</option> -<option name="watch" type="boolean" change-action="none">false</option> -</options> -</tool> -<tool name="Debugger"> -<options> -<option name="target" type="string" change-action="rebuild">Z16F2800100ZCOG</option> -<option name="debugtool" type="string" change-action="none">USBSmartCable</option> -<option name="usepageerase" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="FlashProgrammer"> -<options> -<option name="erasebeforeburn" type="boolean" change-action="none">false</option> -<option name="eraseinfopage" type="boolean" change-action="none">false</option> -<option name="enableinfopage" type="boolean" change-action="none">false</option> -<option name="includeserial" type="boolean" change-action="none">false</option> -<option name="offset" type="integer" change-action="none">0</option> -<option name="snenable" type="boolean" change-action="none">true</option> -<option name="sn" type="string" change-action="none">000000000000000000000000</option> -<option name="snsize" type="integer" change-action="none">1</option> -<option name="snstep" type="integer" change-action="none">000000000000000000000001</option> -<option name="snstepformat" type="integer" change-action="none">0</option> -<option name="snaddress" type="string" change-action="none">0</option> -<option name="snformat" type="integer" change-action="none">0</option> -<option name="snbigendian" type="boolean" change-action="none">true</option> -<option name="singleval" type="string" change-action="none">0</option> -<option name="singlevalformat" type="integer" change-action="none">0</option> -<option name="usepageerase" type="boolean" change-action="none">false</option> -<option name="autoselect" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="General"> -<options> -<option name="warn" type="boolean" change-action="none">true</option> -<option name="debug" type="boolean" change-action="assemble">true</option> -<option name="debugcache" type="boolean" change-action="none">true</option> -<option name="igcase" type="boolean" change-action="assemble">false</option> -<option name="outputdir" type="string" change-action="compile">.</option> -</options> -</tool> -<tool name="Librarian"> -<options> -<option name="outfile" type="string" change-action="build"></option> -<option name="warn" type="boolean" change-action="none">false</option> -</options> -</tool> -<tool name="Linker"> -<options> -<option name="directives" type="string" change-action="build"></option> -<option name="createnew" type="boolean" change-action="build">false</option> -<option name="eram" type="string" change-action="build">0-0</option> -<option name="erom" type="string" change-action="build">0-0</option> -<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option> -<option name="fplib" type="string" change-action="build">Dummy</option> -<option name="iodata" type="string" change-action="build">0-0</option> -<option name="linkctlfile" type="string" change-action="build"></option> -<option name="map" type="boolean" change-action="none">true</option> -<option name="maxhexlen" type="integer" change-action="build">64</option> -<option name="objlibmods" type="string" change-action="build"></option> -<option name="of" type="string" change-action="build">.\ostest</option> -<option name="padhex" type="boolean" change-action="build">false</option> -<option name="quiet" type="boolean" change-action="none">false</option> -<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option> -<option name="relist" type="boolean" change-action="build">false</option> -<option name="rom" type="string" change-action="build">000000-007FFF</option> -<option name="sort" type="string" change-action="none">name</option> -<option name="startuplnkcmds" type="boolean" change-action="build">true</option> -<option name="startuptype" type="string" change-action="build">1</option> -<option name="undefisfatal" type="boolean" change-action="none">true</option> -<option name="useadddirectives" type="boolean" change-action="build">false</option> -<option name="usecrun" type="boolean" change-action="build">true</option> -<option name="warnoverlap" type="boolean" change-action="none">false</option> -<option name="warnisfatal" type="boolean" change-action="none">false</option> -<option name="xref" type="boolean" change-action="none">false</option> -</options> -</tool> -</tools> -</configuration> -<configuration name="Release" > -<tools> -<tool name="Assembler"> -<options> -<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option> -<option name="include" type="string" change-action="assemble"></option> -<option name="list" type="boolean" change-action="none">true</option> -<option name="listmac" type="boolean" change-action="none">false</option> -<option name="name" type="boolean" change-action="none">true</option> -<option name="pagelen" type="integer" change-action="none">56</option> -<option name="pagewidth" type="integer" change-action="none">80</option> -<option name="quiet" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="Compiler"> -<options> -<option name="chartype" type="string" change-action="compile">U</option> -<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option> -<option name="genprintf" type="boolean" change-action="compile">true</option> -<option name="keepasm" type="boolean" change-action="none">false</option> -<option name="keeplst" type="boolean" change-action="none">false</option> -<option name="list" type="boolean" change-action="none">false</option> -<option name="listinc" type="boolean" change-action="none">false</option> -<option name="model" type="string" change-action="compile">S</option> -<option name="modsect" type="boolean" change-action="compile">false</option> -<option name="stdinc" type="string" change-action="compile"></option> -<option name="usrinc" type="string" change-action="compile"></option> -<option name="regvar" type="boolean" change-action="compile">true</option> -<option name="regvarcache" type="boolean" change-action="none">false</option> -<option name="reduceopt" type="boolean" change-action="compile">false</option> -<option name="watch" type="boolean" change-action="none">false</option> -</options> -</tool> -<tool name="Debugger"> -<options> -<option name="target" type="string" change-action="rebuild"></option> -<option name="debugtool" type="string" change-action="none">ZPAKII</option> -<option name="usepageerase" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="FlashProgrammer"> -<options> -<option name="erasebeforeburn" type="boolean" change-action="none">false</option> -<option name="eraseinfopage" type="boolean" change-action="none">false</option> -<option name="enableinfopage" type="boolean" change-action="none">false</option> -<option name="includeserial" type="boolean" change-action="none">false</option> -<option name="offset" type="integer" change-action="none">0</option> -<option name="snenable" type="boolean" change-action="none">false</option> -<option name="sn" type="string" change-action="none">0</option> -<option name="snsize" type="integer" change-action="none">0</option> -<option name="snstep" type="integer" change-action="none">1</option> -<option name="snstepformat" type="integer" change-action="none">0</option> -<option name="snaddress" type="string" change-action="none">0</option> -<option name="snformat" type="integer" change-action="none">0</option> -<option name="snbigendian" type="boolean" change-action="none">true</option> -<option name="singleval" type="string" change-action="none">0</option> -<option name="singlevalformat" type="integer" change-action="none">0</option> -<option name="usepageerase" type="boolean" change-action="none">false</option> -<option name="autoselect" type="boolean" change-action="none">true</option> -</options> -</tool> -<tool name="General"> -<options> -<option name="warn" type="boolean" change-action="none">true</option> -<option name="debug" type="boolean" change-action="assemble">false</option> -<option name="debugcache" type="boolean" change-action="none">true</option> -<option name="igcase" type="boolean" change-action="assemble">false</option> -<option name="outputdir" type="string" change-action="compile">.</option> -</options> -</tool> -<tool name="Librarian"> -<options> -<option name="outfile" type="string" change-action="build"></option> -<option name="warn" type="boolean" change-action="none">false</option> -</options> -</tool> -<tool name="Linker"> -<options> -<option name="directives" type="string" change-action="build"></option> -<option name="createnew" type="boolean" change-action="build">false</option> -<option name="eram" type="string" change-action="build">0-0</option> -<option name="erom" type="string" change-action="build">0-0</option> -<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option> -<option name="fplib" type="string" change-action="build">Dummy</option> -<option name="iodata" type="string" change-action="build">0-0</option> -<option name="linkctlfile" type="string" change-action="build"></option> -<option name="map" type="boolean" change-action="none">true</option> -<option name="maxhexlen" type="integer" change-action="build">64</option> -<option name="objlibmods" type="string" change-action="build"></option> -<option name="of" type="string" change-action="build">.\ostest</option> -<option name="padhex" type="boolean" change-action="build">false</option> -<option name="quiet" type="boolean" change-action="none">false</option> -<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option> -<option name="relist" type="boolean" change-action="build">false</option> -<option name="rom" type="string" change-action="build">000000-007FFF</option> -<option name="sort" type="string" change-action="none">name</option> -<option name="startuplnkcmds" type="boolean" change-action="build">true</option> -<option name="startuptype" type="string" change-action="build">1</option> -<option name="undefisfatal" type="boolean" change-action="none">true</option> -<option name="useadddirectives" type="boolean" change-action="build">false</option> -<option name="usecrun" type="boolean" change-action="build">true</option> -<option name="warnoverlap" type="boolean" change-action="none">false</option> -<option name="warnisfatal" type="boolean" change-action="none">false</option> -<option name="xref" type="boolean" change-action="none">false</option> -</options> -</tool> -</tools> -</configuration> -</configurations> - -<!-- watch information --> -<watch-elements> -</watch-elements> - -<!-- breakpoint information --> -<breakpoints> -</breakpoints> - +<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="c:4.11:07031901">
+<cpu>Z16F2811AL</cpu>
+
+<!-- file information -->
+<files>
+<file filter-key="flash">..\..\..\nuttx.hex</file>
+</files>
+
+<!-- configuration information -->
+<configurations>
+<configuration name="Debug" >
+<tools>
+<tool name="Assembler">
+<options>
+<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option>
+<option name="include" type="string" change-action="assemble"></option>
+<option name="list" type="boolean" change-action="none">true</option>
+<option name="listmac" type="boolean" change-action="none">false</option>
+<option name="name" type="boolean" change-action="none">true</option>
+<option name="pagelen" type="integer" change-action="none">56</option>
+<option name="pagewidth" type="integer" change-action="none">80</option>
+<option name="quiet" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="Compiler">
+<options>
+<option name="chartype" type="string" change-action="compile">U</option>
+<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option>
+<option name="genprintf" type="boolean" change-action="compile">true</option>
+<option name="keepasm" type="boolean" change-action="none">false</option>
+<option name="keeplst" type="boolean" change-action="none">false</option>
+<option name="list" type="boolean" change-action="none">false</option>
+<option name="listinc" type="boolean" change-action="none">false</option>
+<option name="model" type="string" change-action="compile">S</option>
+<option name="modsect" type="boolean" change-action="compile">false</option>
+<option name="stdinc" type="string" change-action="compile"></option>
+<option name="usrinc" type="string" change-action="compile"></option>
+<option name="regvar" type="boolean" change-action="compile">true</option>
+<option name="regvarcache" type="boolean" change-action="none">false</option>
+<option name="reduceopt" type="boolean" change-action="compile">false</option>
+<option name="watch" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+<tool name="Debugger">
+<options>
+<option name="target" type="string" change-action="rebuild">Z16F2800100ZCOG</option>
+<option name="debugtool" type="string" change-action="none">USBSmartCable</option>
+<option name="usepageerase" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="FlashProgrammer">
+<options>
+<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
+<option name="eraseinfopage" type="boolean" change-action="none">false</option>
+<option name="enableinfopage" type="boolean" change-action="none">false</option>
+<option name="includeserial" type="boolean" change-action="none">false</option>
+<option name="offset" type="integer" change-action="none">0</option>
+<option name="snenable" type="boolean" change-action="none">true</option>
+<option name="sn" type="string" change-action="none">000000000000000000000000</option>
+<option name="snsize" type="integer" change-action="none">1</option>
+<option name="snstep" type="integer" change-action="none">000000000000000000000001</option>
+<option name="snstepformat" type="integer" change-action="none">0</option>
+<option name="snaddress" type="string" change-action="none">0</option>
+<option name="snformat" type="integer" change-action="none">0</option>
+<option name="snbigendian" type="boolean" change-action="none">true</option>
+<option name="singleval" type="string" change-action="none">0</option>
+<option name="singlevalformat" type="integer" change-action="none">0</option>
+<option name="usepageerase" type="boolean" change-action="none">false</option>
+<option name="autoselect" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="General">
+<options>
+<option name="warn" type="boolean" change-action="none">true</option>
+<option name="debug" type="boolean" change-action="assemble">true</option>
+<option name="debugcache" type="boolean" change-action="none">true</option>
+<option name="igcase" type="boolean" change-action="assemble">false</option>
+<option name="outputdir" type="string" change-action="compile">.</option>
+</options>
+</tool>
+<tool name="Librarian">
+<options>
+<option name="outfile" type="string" change-action="build"></option>
+<option name="warn" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+<tool name="Linker">
+<options>
+<option name="directives" type="string" change-action="build"></option>
+<option name="createnew" type="boolean" change-action="build">false</option>
+<option name="eram" type="string" change-action="build">0-0</option>
+<option name="erom" type="string" change-action="build">0-0</option>
+<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
+<option name="fplib" type="string" change-action="build">Dummy</option>
+<option name="iodata" type="string" change-action="build">0-0</option>
+<option name="linkctlfile" type="string" change-action="build"></option>
+<option name="map" type="boolean" change-action="none">true</option>
+<option name="maxhexlen" type="integer" change-action="build">64</option>
+<option name="objlibmods" type="string" change-action="build"></option>
+<option name="of" type="string" change-action="build">.\ostest</option>
+<option name="padhex" type="boolean" change-action="build">false</option>
+<option name="quiet" type="boolean" change-action="none">false</option>
+<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
+<option name="relist" type="boolean" change-action="build">false</option>
+<option name="rom" type="string" change-action="build">000000-007FFF</option>
+<option name="sort" type="string" change-action="none">name</option>
+<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
+<option name="startuptype" type="string" change-action="build">1</option>
+<option name="undefisfatal" type="boolean" change-action="none">true</option>
+<option name="useadddirectives" type="boolean" change-action="build">false</option>
+<option name="usecrun" type="boolean" change-action="build">true</option>
+<option name="warnoverlap" type="boolean" change-action="none">false</option>
+<option name="warnisfatal" type="boolean" change-action="none">false</option>
+<option name="xref" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+</tools>
+</configuration>
+<configuration name="Release" >
+<tools>
+<tool name="Assembler">
+<options>
+<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option>
+<option name="include" type="string" change-action="assemble"></option>
+<option name="list" type="boolean" change-action="none">true</option>
+<option name="listmac" type="boolean" change-action="none">false</option>
+<option name="name" type="boolean" change-action="none">true</option>
+<option name="pagelen" type="integer" change-action="none">56</option>
+<option name="pagewidth" type="integer" change-action="none">80</option>
+<option name="quiet" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="Compiler">
+<options>
+<option name="chartype" type="string" change-action="compile">U</option>
+<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option>
+<option name="genprintf" type="boolean" change-action="compile">true</option>
+<option name="keepasm" type="boolean" change-action="none">false</option>
+<option name="keeplst" type="boolean" change-action="none">false</option>
+<option name="list" type="boolean" change-action="none">false</option>
+<option name="listinc" type="boolean" change-action="none">false</option>
+<option name="model" type="string" change-action="compile">S</option>
+<option name="modsect" type="boolean" change-action="compile">false</option>
+<option name="stdinc" type="string" change-action="compile"></option>
+<option name="usrinc" type="string" change-action="compile"></option>
+<option name="regvar" type="boolean" change-action="compile">true</option>
+<option name="regvarcache" type="boolean" change-action="none">false</option>
+<option name="reduceopt" type="boolean" change-action="compile">false</option>
+<option name="watch" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+<tool name="Debugger">
+<options>
+<option name="target" type="string" change-action="rebuild"></option>
+<option name="debugtool" type="string" change-action="none">ZPAKII</option>
+<option name="usepageerase" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="FlashProgrammer">
+<options>
+<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
+<option name="eraseinfopage" type="boolean" change-action="none">false</option>
+<option name="enableinfopage" type="boolean" change-action="none">false</option>
+<option name="includeserial" type="boolean" change-action="none">false</option>
+<option name="offset" type="integer" change-action="none">0</option>
+<option name="snenable" type="boolean" change-action="none">false</option>
+<option name="sn" type="string" change-action="none">0</option>
+<option name="snsize" type="integer" change-action="none">0</option>
+<option name="snstep" type="integer" change-action="none">1</option>
+<option name="snstepformat" type="integer" change-action="none">0</option>
+<option name="snaddress" type="string" change-action="none">0</option>
+<option name="snformat" type="integer" change-action="none">0</option>
+<option name="snbigendian" type="boolean" change-action="none">true</option>
+<option name="singleval" type="string" change-action="none">0</option>
+<option name="singlevalformat" type="integer" change-action="none">0</option>
+<option name="usepageerase" type="boolean" change-action="none">false</option>
+<option name="autoselect" type="boolean" change-action="none">true</option>
+</options>
+</tool>
+<tool name="General">
+<options>
+<option name="warn" type="boolean" change-action="none">true</option>
+<option name="debug" type="boolean" change-action="assemble">false</option>
+<option name="debugcache" type="boolean" change-action="none">true</option>
+<option name="igcase" type="boolean" change-action="assemble">false</option>
+<option name="outputdir" type="string" change-action="compile">.</option>
+</options>
+</tool>
+<tool name="Librarian">
+<options>
+<option name="outfile" type="string" change-action="build"></option>
+<option name="warn" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+<tool name="Linker">
+<options>
+<option name="directives" type="string" change-action="build"></option>
+<option name="createnew" type="boolean" change-action="build">false</option>
+<option name="eram" type="string" change-action="build">0-0</option>
+<option name="erom" type="string" change-action="build">0-0</option>
+<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
+<option name="fplib" type="string" change-action="build">Dummy</option>
+<option name="iodata" type="string" change-action="build">0-0</option>
+<option name="linkctlfile" type="string" change-action="build"></option>
+<option name="map" type="boolean" change-action="none">true</option>
+<option name="maxhexlen" type="integer" change-action="build">64</option>
+<option name="objlibmods" type="string" change-action="build"></option>
+<option name="of" type="string" change-action="build">.\ostest</option>
+<option name="padhex" type="boolean" change-action="build">false</option>
+<option name="quiet" type="boolean" change-action="none">false</option>
+<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
+<option name="relist" type="boolean" change-action="build">false</option>
+<option name="rom" type="string" change-action="build">000000-007FFF</option>
+<option name="sort" type="string" change-action="none">name</option>
+<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
+<option name="startuptype" type="string" change-action="build">1</option>
+<option name="undefisfatal" type="boolean" change-action="none">true</option>
+<option name="useadddirectives" type="boolean" change-action="build">false</option>
+<option name="usecrun" type="boolean" change-action="build">true</option>
+<option name="warnoverlap" type="boolean" change-action="none">false</option>
+<option name="warnisfatal" type="boolean" change-action="none">false</option>
+<option name="xref" type="boolean" change-action="none">false</option>
+</options>
+</tool>
+</tools>
+</configuration>
+</configurations>
+
+<!-- watch information -->
+<watch-elements>
+<watch-element expression="0x801d1a" />
+</watch-elements>
+
+<!-- breakpoint information -->
+<breakpoints>
+</breakpoints>
+
</project>
\ No newline at end of file diff --git a/nuttx/include/fcntl.h b/nuttx/include/fcntl.h index 10780da2c..b4f0aa82a 100644 --- a/nuttx/include/fcntl.h +++ b/nuttx/include/fcntl.h @@ -112,11 +112,11 @@ struct flock { - short l_type; /* Type of lock: F_RDLCK, F_WRLCK, F_UNLCK */ - short l_whence; /* How to interpret l_start: SEEK_SET, SEEK_CUR, SEEK_END */ - off_t l_start; /* Starting offset for lock */ - off_t l_len; /* Number of bytes to lock */ - pid_t l_pid; /* PID of process blocking our lock (F_GETLK only) */ + sint16 l_type; /* Type of lock: F_RDLCK, F_WRLCK, F_UNLCK */ + sint16 l_whence; /* How to interpret l_start: SEEK_SET, SEEK_CUR, SEEK_END */ + off_t l_start; /* Starting offset for lock */ + off_t l_len; /* Number of bytes to lock */ + pid_t l_pid; /* PID of process blocking our lock (F_GETLK only) */ }; /******************************************************************************** diff --git a/nuttx/include/pthread.h b/nuttx/include/pthread.h index 0f4a027fe..6ce1e9564 100644 --- a/nuttx/include/pthread.h +++ b/nuttx/include/pthread.h @@ -1,7 +1,7 @@ /******************************************************************************** * pthread.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -128,7 +128,7 @@ typedef pthread_startroutine_t pthread_func_t; struct pthread_addr_s { size_t stacksize; /* Size of the stack allocated for the pthead */ - short priority; /* Priority of the pthread */ + sint16 priority; /* Priority of the pthread */ ubyte policy; /* Pthread scheduler policy */ ubyte inheritsched; /* Inherit parent prio/policy? */ }; @@ -190,7 +190,7 @@ struct sched_param; /* Defined in sched.h */ * the individual attributes used by a given implementation. */ -EXTERN int pthread_attr_init(pthread_attr_t *attr); +EXTERN int pthread_attr_init(FAR pthread_attr_t *attr); /* An attributes object can be deleted when it is no longer needed. */ @@ -198,20 +198,20 @@ EXTERN int pthread_attr_destroy(pthread_attr_t *attr); /* Set or obtain the default scheduling algorithm */ -EXTERN int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); -EXTERN int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy); -EXTERN int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param); -EXTERN int pthread_attr_getschedparam(pthread_attr_t *attr, - struct sched_param *param); -EXTERN int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched); -EXTERN int pthread_attr_getinheritsched(const pthread_attr_t *attr, - int *inheritsched); +EXTERN int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy); +EXTERN int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy); +EXTERN int pthread_attr_setschedparam(FAR pthread_attr_t *attr, + FAR const struct sched_param *param); +EXTERN int pthread_attr_getschedparam(FAR pthread_attr_t *attr, + FAR struct sched_param *param); +EXTERN int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, int inheritsched); +EXTERN int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, + FAR int *inheritsched); /* Set or obtain the default stack size */ -EXTERN int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize); -EXTERN int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr); +EXTERN int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize); +EXTERN int pthread_attr_getstacksize(FAR pthread_attr_t *attr, long *stackaddr); /* To create a thread object and runnable thread, a routine must be specified * as the new thread's start routine. An argument may be passed to this @@ -220,7 +220,7 @@ EXTERN int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr); * about the kind of thread being created. */ -EXTERN int pthread_create(pthread_t *thread, pthread_attr_t *attr, +EXTERN int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, pthread_startroutine_t startroutine, pthread_addr_t arg); @@ -236,14 +236,14 @@ EXTERN int pthread_detach(pthread_t thread); EXTERN void pthread_exit(pthread_addr_t value) noreturn_function; EXTERN int pthread_cancel(pthread_t thread); -EXTERN int pthread_setcancelstate(int state, int *oldstate); +EXTERN int pthread_setcancelstate(int state, FAR int *oldstate); EXTERN void pthread_testcancel(void); /* A thread can await termination of another thread and retrieve the return * value of the thread. */ -EXTERN int pthread_join(pthread_t thread, pthread_addr_t *value); +EXTERN int pthread_join(pthread_t thread, FAR pthread_addr_t *value); /* A thread may tell the scheduler that its processor can be made available. */ @@ -259,58 +259,58 @@ EXTERN void pthread_yield(void); /* Thread scheduling parameters */ -EXTERN int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param); +EXTERN int pthread_getschedparam(pthread_t thread, FAR int *policy, + FAR struct sched_param *param); EXTERN int pthread_setschedparam(pthread_t thread, int policy, - const struct sched_param *param); + FAR const struct sched_param *param); EXTERN int pthread_setschedprio(pthread_t thread, int prio); /* Thread-specific Data Interfaces */ -EXTERN int pthread_key_create(pthread_key_t *key, - FAR void (*destructor)(FAR void*)); +EXTERN int pthread_key_create(FAR pthread_key_t *key, + CODE void (*destructor)(FAR void*)); EXTERN int pthread_setspecific(pthread_key_t key, FAR void *value); EXTERN FAR void *pthread_getspecific(pthread_key_t key); EXTERN int pthread_key_delete(pthread_key_t key); /* Create, operate on, and destroy mutex attributes. */ -EXTERN int pthread_mutexattr_init(pthread_mutexattr_t *attr); -EXTERN int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); -EXTERN int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared); -EXTERN int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); +EXTERN int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared); +EXTERN int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared); /* The following routines create, delete, lock and unlock mutexes. */ -EXTERN int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr); -EXTERN int pthread_mutex_destroy(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_lock(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_trylock(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_unlock(pthread_mutex_t *mutex); +EXTERN int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutex_destroy(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_lock(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_trylock(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_unlock(FAR pthread_mutex_t *mutex); /* Operations on condition variables */ -EXTERN int pthread_condattr_init(pthread_condattr_t *attr); -EXTERN int pthread_condattr_destroy(pthread_condattr_t *attr); +EXTERN int pthread_condattr_init(FAR pthread_condattr_t *attr); +EXTERN int pthread_condattr_destroy(FAR pthread_condattr_t *attr); /* A thread can create and delete condition variables. */ -EXTERN int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr); -EXTERN int pthread_cond_destroy(pthread_cond_t *cond); +EXTERN int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr); +EXTERN int pthread_cond_destroy(FAR pthread_cond_t *cond); /* A thread can signal to and broadcast on a condition variable. */ -EXTERN int pthread_cond_broadcast(pthread_cond_t *cond); -EXTERN int pthread_cond_signal(pthread_cond_t *cond); +EXTERN int pthread_cond_broadcast(FAR pthread_cond_t *cond); +EXTERN int pthread_cond_signal(FAR pthread_cond_t *cond); /* A thread can wait for a condition variable to be signalled or broadcast. */ -EXTERN int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); +EXTERN int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex); /* A thread can perform a timed wait on a condition variable. */ -EXTERN int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); +EXTERN int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, + FAR const struct timespec *abstime); /* Barrier attributes */ diff --git a/nuttx/sched/pthread_attrdestroy.c b/nuttx/sched/pthread_attrdestroy.c index 14f7ca911..bdacdab26 100644 --- a/nuttx/sched/pthread_attrdestroy.c +++ b/nuttx/sched/pthread_attrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_destroy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_destroy(pthread_attr_t *attr) +int pthread_attr_destroy(FAR pthread_attr_t *attr) { int ret; diff --git a/nuttx/sched/pthread_attrgetinheritsched.c b/nuttx/sched/pthread_attrgetinheritsched.c index 2771b0326..367d9d6cf 100644 --- a/nuttx/sched/pthread_attrgetinheritsched.c +++ b/nuttx/sched/pthread_attrgetinheritsched.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetinheritsched.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getinheritsched * * Description: @@ -85,10 +85,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getinheritsched(const pthread_attr_t *attr, - int *inheritsched) +int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, + FAR int *inheritsched) { int ret; diff --git a/nuttx/sched/pthread_attrgetschedparam.c b/nuttx/sched/pthread_attrgetschedparam.c index 0c24ad6ce..dd3303c46 100644 --- a/nuttx/sched/pthread_attrgetschedparam.c +++ b/nuttx/sched/pthread_attrgetschedparam.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -45,31 +45,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getschedparam * * Description: @@ -83,10 +83,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getschedparam(pthread_attr_t *attr, - struct sched_param *param) +int pthread_attr_getschedparam(FAR pthread_attr_t *attr, + FAR struct sched_param *param) { int ret; diff --git a/nuttx/sched/pthread_attrgetschedpolicy.c b/nuttx/sched/pthread_attrgetschedpolicy.c index a61a7a6a2..de72ef8d6 100644 --- a/nuttx/sched/pthread_attrgetschedpolicy.c +++ b/nuttx/sched/pthread_attrgetschedpolicy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetschedpolicy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getschedpolicy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy) +int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy) { int ret; diff --git a/nuttx/sched/pthread_attrgetstacksize.c b/nuttx/sched/pthread_attrgetstacksize.c index d329f66e4..c5597d2a4 100644 --- a/nuttx/sched/pthread_attrgetstacksize.c +++ b/nuttx/sched/pthread_attrgetstacksize.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetstacksize.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getstacksize * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize) +int pthread_attr_getstacksize(FAR pthread_attr_t *attr, FAR long *stacksize) { int ret; diff --git a/nuttx/sched/pthread_attrinit.c b/nuttx/sched/pthread_attrinit.c index 51f44019b..003cd8677 100644 --- a/nuttx/sched/pthread_attrinit.c +++ b/nuttx/sched/pthread_attrinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_init * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_init(pthread_attr_t *attr) +int pthread_attr_init(FAR pthread_attr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_attrsetinheritsched.c b/nuttx/sched/pthread_attrsetinheritsched.c index 103429fa3..c17703a5f 100644 --- a/nuttx/sched/pthread_attrsetinheritsched.c +++ b/nuttx/sched/pthread_attrsetinheritsched.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetinheritsched.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setinheritsched * * Description: @@ -85,9 +85,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setinheritsched(pthread_attr_t *attr, +int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, int inheritsched) { int ret; diff --git a/nuttx/sched/pthread_attrsetschedparam.c b/nuttx/sched/pthread_attrsetschedparam.c index ab0bfacfd..9cf699cbf 100644 --- a/nuttx/sched/pthread_attrsetschedparam.c +++ b/nuttx/sched/pthread_attrsetschedparam.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -45,31 +45,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setschedparam * * Description: @@ -83,10 +83,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param) +int pthread_attr_setschedparam(FAR pthread_attr_t *attr, + FAR const struct sched_param *param) { int ret; diff --git a/nuttx/sched/pthread_attrsetschedpolicy.c b/nuttx/sched/pthread_attrsetschedpolicy.c index 89c0b7a13..73bfb7339 100644 --- a/nuttx/sched/pthread_attrsetschedpolicy.c +++ b/nuttx/sched/pthread_attrsetschedpolicy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetschedpolicy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -45,31 +45,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setschedpolicy * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) +int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy) { int ret; diff --git a/nuttx/sched/pthread_attrsetstacksize.c b/nuttx/sched/pthread_attrsetstacksize.c index 19aeb07c4..7286441c7 100644 --- a/nuttx/sched/pthread_attrsetstacksize.c +++ b/nuttx/sched/pthread_attrsetstacksize.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetstacksize.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setstacksize * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize) +int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize) { int ret; diff --git a/nuttx/sched/pthread_condattrdestroy.c b/nuttx/sched/pthread_condattrdestroy.c index 5f0991ddd..e1d4d41fd 100644 --- a/nuttx/sched/pthread_condattrdestroy.c +++ b/nuttx/sched/pthread_condattrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_condattrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,11 +43,11 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condattr_destroy * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_condattr_destroy(pthread_condattr_t *attr) +int pthread_condattr_destroy(FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_condattrinit.c b/nuttx/sched/pthread_condattrinit.c index c5ebe2602..4e9ca23d9 100644 --- a/nuttx/sched/pthread_condattrinit.c +++ b/nuttx/sched/pthread_condattrinit.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condattrinit.c +/**************************************************************************** + * sched/pthread_condattrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,11 +43,11 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condattr_init * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_condattr_init(pthread_condattr_t *attr) +int pthread_condattr_init(FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_condbroadcast.c b/nuttx/sched/pthread_condbroadcast.c index 307f2ceb1..4cda2af70 100644 --- a/nuttx/sched/pthread_condbroadcast.c +++ b/nuttx/sched/pthread_condbroadcast.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condbroadcast.c +/**************************************************************************** + * sched/pthread_condbroadcast.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_broadcast * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_broadcast(pthread_cond_t *cond) +int pthread_cond_broadcast(FAR pthread_cond_t *cond) { int ret = OK; int sval; diff --git a/nuttx/sched/pthread_conddestroy.c b/nuttx/sched/pthread_conddestroy.c index 286527d6f..e473f7564 100644 --- a/nuttx/sched/pthread_conddestroy.c +++ b/nuttx/sched/pthread_conddestroy.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_conddestroy.c +/**************************************************************************** + * sched/pthread_conddestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,11 +43,11 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_destroy * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_destroy(pthread_cond_t *cond) +int pthread_cond_destroy(FAR pthread_cond_t *cond) { int ret = OK; diff --git a/nuttx/sched/pthread_condinit.c b/nuttx/sched/pthread_condinit.c index 98c68c87d..6b9eebd5f 100644 --- a/nuttx/sched/pthread_condinit.c +++ b/nuttx/sched/pthread_condinit.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condinit.c +/**************************************************************************** + * sched/pthread_condinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,11 +43,11 @@ #include <errno.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_init * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) +int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_condsignal.c b/nuttx/sched/pthread_condsignal.c index 9c792938f..771d9a769 100644 --- a/nuttx/sched/pthread_condsignal.c +++ b/nuttx/sched/pthread_condsignal.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condsignal.c +/**************************************************************************** + * sched/pthread_condsignal.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_signal * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_signal(pthread_cond_t *cond) +int pthread_cond_signal(FAR pthread_cond_t *cond) { int ret = OK; int sval; diff --git a/nuttx/sched/pthread_condtimedwait.c b/nuttx/sched/pthread_condtimedwait.c index d4d607bd7..32a3d550b 100644 --- a/nuttx/sched/pthread_condtimedwait.c +++ b/nuttx/sched/pthread_condtimedwait.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condtimedwait.c +/**************************************************************************** + * sched/pthread_condtimedwait.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/compiler.h> #include <sys/types.h> @@ -50,27 +50,27 @@ #include "pthread_internal.h" #include "clock_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condtimedout * * Description: @@ -87,7 +87,7 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) { @@ -103,11 +103,11 @@ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) #endif } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_timedwait * * Description: @@ -126,10 +126,10 @@ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) * Timing is of resolution 1 msec, with +/-1 millisecond * accuracy. * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime) +int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, + FAR const struct timespec *abstime) { WDOG_ID wdog; sint32 ticks; diff --git a/nuttx/sched/pthread_condwait.c b/nuttx/sched/pthread_condwait.c index 799c6b85d..56f49d4ac 100644 --- a/nuttx/sched/pthread_condwait.c +++ b/nuttx/sched/pthread_condwait.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condwait.c +/**************************************************************************** + * sched/pthread_condwait.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <unistd.h> @@ -45,31 +45,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: int pthread_cond_wait * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) { int ret; diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c index bd86643f9..f13f76b14 100644 --- a/nuttx/sched/pthread_create.c +++ b/nuttx/sched/pthread_create.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_create.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> @@ -52,17 +52,17 @@ #include "env_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ /* Default pthread attributes */ @@ -74,19 +74,19 @@ FAR pthread_attr_t g_default_pthread_attr = PTHREAD_EXPLICIT_SCHED, /* inheritsched */ }; -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ /* This is the name for name-less pthreads */ static const char g_pthreadname[] = "<pthread>"; -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: pthread_argsetup * * Description: @@ -111,7 +111,7 @@ static const char g_pthreadname[] = "<pthread>"; * Return Value: * OK * - ************************************************************/ + ****************************************************************************/ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) { @@ -145,7 +145,7 @@ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) } } -/************************************************************ +/**************************************************************************** * Function: pthread_addjoininfo * * Description: @@ -160,7 +160,7 @@ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) * Assumptions: * The caller has provided protection from re-entrancy. * - ************************************************************/ + ****************************************************************************/ static void pthread_addjoininfo(FAR join_t *pjoin) { @@ -176,7 +176,7 @@ static void pthread_addjoininfo(FAR join_t *pjoin) g_pthread_tail = pjoin; } -/************************************************************ +/**************************************************************************** * Name: pthread_start * * Description: @@ -186,7 +186,7 @@ static void pthread_addjoininfo(FAR join_t *pjoin) * Parameters: * None * - ************************************************************/ + ****************************************************************************/ static void pthread_start(void) { @@ -219,11 +219,11 @@ static void pthread_start(void) pthread_exit(exit_status); } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: pthread_create * * Description: @@ -235,11 +235,10 @@ static void pthread_start(void) * attr * start_routine * arg - ************************************************************/ + ****************************************************************************/ -int pthread_create(pthread_t *thread, pthread_attr_t *attr, - pthread_startroutine_t start_routine, - pthread_addr_t arg) +int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, + pthread_startroutine_t start_routine, pthread_addr_t arg) { FAR _TCB *ptcb; FAR join_t *pjoin; diff --git a/nuttx/sched/pthread_getschedparam.c b/nuttx/sched/pthread_getschedparam.c index 5a6ac861d..462c6c320 100644 --- a/nuttx/sched/pthread_getschedparam.c +++ b/nuttx/sched/pthread_getschedparam.c @@ -1,7 +1,7 @@ -/**************************************************************************** +/******************************************************************************************** * pthread_getschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Included Files - ****************************************************************************/ + ********************************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <debug.h> #include "pthread_internal.h" -/**************************************************************************** +/******************************************************************************************** * Definitions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Type Declarations - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Global Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Public Functions - *****************************************************************************/ + *********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Function: pthread_getschedparam * * Description: @@ -101,10 +101,9 @@ * * Assumptions: * - ****************************************************************************/ + ********************************************************************************************/ -int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param) +int pthread_getschedparam(pthread_t thread, FAR int *policy, FAR struct sched_param *param) { int ret; diff --git a/nuttx/sched/pthread_join.c b/nuttx/sched/pthread_join.c index 9cc8ce9e9..4684b4f98 100644 --- a/nuttx/sched/pthread_join.c +++ b/nuttx/sched/pthread_join.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_join.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <unistd.h> @@ -45,31 +45,31 @@ #include "os_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_join * * Description: @@ -92,9 +92,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) +int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) { FAR join_t *pjoin; int ret; diff --git a/nuttx/sched/pthread_keycreate.c b/nuttx/sched/pthread_keycreate.c index 00d127160..c11ccafe1 100644 --- a/nuttx/sched/pthread_keycreate.c +++ b/nuttx/sched/pthread_keycreate.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_keycreate.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> @@ -45,31 +45,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_key_create * * Description: @@ -110,9 +110,9 @@ * - The present implementation ignores the destructor * argument. * - ************************************************************/ + ****************************************************************************/ -int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)) +int pthread_key_create(FAR pthread_key_t *key, CODE void (*destructor)(void*)) { #if CONFIG_NPTHREAD_KEYS > 0 int ret = EAGAIN; diff --git a/nuttx/sched/pthread_mutexattrdestroy.c b/nuttx/sched/pthread_mutexattrdestroy.c index 221e8b1ca..72568e133 100644 --- a/nuttx/sched/pthread_mutexattrdestroy.c +++ b/nuttx/sched/pthread_mutexattrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_destroy * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) +int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_mutexattrgetpshared.c b/nuttx/sched/pthread_mutexattrgetpshared.c index 3b5a869e8..873e7ca2f 100644 --- a/nuttx/sched/pthread_mutexattrgetpshared.c +++ b/nuttx/sched/pthread_mutexattrgetpshared.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrgetpshared.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_getpshared * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared) +int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared) { int ret = OK; diff --git a/nuttx/sched/pthread_mutexattrinit.c b/nuttx/sched/pthread_mutexattrinit.c index 3225ad33a..85b1e953d 100644 --- a/nuttx/sched/pthread_mutexattrinit.c +++ b/nuttx/sched/pthread_mutexattrinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_init * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_init(pthread_mutexattr_t *attr) +int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) { int ret = OK; diff --git a/nuttx/sched/pthread_mutexattrsetpshared.c b/nuttx/sched/pthread_mutexattrsetpshared.c index 53a616fce..7574240df 100644 --- a/nuttx/sched/pthread_mutexattrsetpshared.c +++ b/nuttx/sched/pthread_mutexattrsetpshared.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrsetpshared.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_setpshared * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) +int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared) { int ret = OK; diff --git a/nuttx/sched/pthread_mutexdestroy.c b/nuttx/sched/pthread_mutexdestroy.c index e894f81ae..2b994e664 100644 --- a/nuttx/sched/pthread_mutexdestroy.c +++ b/nuttx/sched/pthread_mutexdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexdestroy.c +/**************************************************************************** + * sched/pthread_mutexdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -45,31 +45,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_destroy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_destroy(pthread_mutex_t *mutex) +int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) { int ret = OK; int status; diff --git a/nuttx/sched/pthread_mutexinit.c b/nuttx/sched/pthread_mutexinit.c index 928a1e32a..5234c988f 100644 --- a/nuttx/sched/pthread_mutexinit.c +++ b/nuttx/sched/pthread_mutexinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -43,31 +43,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_init * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) +int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr) { int ret = OK; int pshared = 0; diff --git a/nuttx/sched/pthread_mutexlock.c b/nuttx/sched/pthread_mutexlock.c index ef0893f12..d47d468f1 100644 --- a/nuttx/sched/pthread_mutexlock.c +++ b/nuttx/sched/pthread_mutexlock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexlock.c +/**************************************************************************** + * sched/pthread_mutexlock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <unistd.h> @@ -45,31 +45,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_lock * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_lock(pthread_mutex_t *mutex) +int pthread_mutex_lock(FAR pthread_mutex_t *mutex) { int mypid = (int)getpid(); int ret = OK; diff --git a/nuttx/sched/pthread_mutextrylock.c b/nuttx/sched/pthread_mutextrylock.c index 113f64eb8..21c76bd65 100644 --- a/nuttx/sched/pthread_mutextrylock.c +++ b/nuttx/sched/pthread_mutextrylock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutextrylock.c +/**************************************************************************** + * sched/pthread_mutextrylock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <unistd.h> @@ -46,31 +46,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_trylock * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_trylock(pthread_mutex_t *mutex) +int pthread_mutex_trylock(FAR pthread_mutex_t *mutex) { int ret = OK; diff --git a/nuttx/sched/pthread_mutexunlock.c b/nuttx/sched/pthread_mutexunlock.c index d68cb6896..1184fc804 100644 --- a/nuttx/sched/pthread_mutexunlock.c +++ b/nuttx/sched/pthread_mutexunlock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexunlock.c +/**************************************************************************** + * sched/pthread_mutexunlock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <unistd.h> @@ -45,31 +45,31 @@ #include <debug.h> #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_unlock * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_unlock(pthread_mutex_t *mutex) +int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) { int ret = OK; diff --git a/nuttx/sched/pthread_setcancelstate.c b/nuttx/sched/pthread_setcancelstate.c index 4a23b1068..eaa754174 100644 --- a/nuttx/sched/pthread_setcancelstate.c +++ b/nuttx/sched/pthread_setcancelstate.c @@ -1,7 +1,7 @@ -/************************************************************************** +/****************************************************************************************** * pthread_setcancelstate.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,45 +31,45 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Included Files - **************************************************************************/ + ******************************************************************************************/ #include <pthread.h> #include <errno.h> #include "os_internal.h" -/************************************************************************** +/****************************************************************************************** * Private Definitions - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Types - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Function Prototypes - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Global Variables - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Variables - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Functions - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Public Functions - **************************************************************************/ + ******************************************************************************************/ -int pthread_setcancelstate(int state, int *oldstate) +int pthread_setcancelstate(int state, FAR int *oldstate) { _TCB *tcb = (_TCB*)g_readytorun.head; int ret = OK; diff --git a/nuttx/sched/pthread_setschedparam.c b/nuttx/sched/pthread_setschedparam.c index 4f6d1bb49..40e1c4918 100644 --- a/nuttx/sched/pthread_setschedparam.c +++ b/nuttx/sched/pthread_setschedparam.c @@ -1,7 +1,7 @@ -/**************************************************************************** +/******************************************************************************************** * pthread_setschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Included Files - ****************************************************************************/ + ********************************************************************************************/ #include <sys/types.h> #include <pthread.h> @@ -44,31 +44,31 @@ #include <debug.h> #include "pthread_internal.h" -/**************************************************************************** +/******************************************************************************************** * Definitions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Type Declarations - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Global Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Public Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Function: pthread_setschedparam * * Description: @@ -113,10 +113,9 @@ * * Assumptions: * - ****************************************************************************/ + ********************************************************************************************/ -int pthread_setschedparam(pthread_t thread, int policy, - const struct sched_param *param) +int pthread_setschedparam(pthread_t thread, int policy, FAR const struct sched_param *param) { int ret; diff --git a/nuttx/sched/pthread_setspecific.c b/nuttx/sched/pthread_setspecific.c index 4e8414dcf..511e91116 100644 --- a/nuttx/sched/pthread_setspecific.c +++ b/nuttx/sched/pthread_setspecific.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_setspecific.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> @@ -46,31 +46,31 @@ #include "os_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_setspecific * * Description: @@ -109,7 +109,7 @@ * may be called from a thread-specific data destructor * function. * - ************************************************************/ + ****************************************************************************/ int pthread_setspecific(pthread_key_t key, FAR void *value) { |