Author: silverblade
Date: Sun Feb 15 09:19:58 2009
New Revision: 39608
URL: http://svn.reactos.org/svn/reactos?rev=39608&view=rev
Log:
WaveHdr prepare/unprepare/submit now gets handled within the context of the
appropriate sound thread. This removes some responsibility of the sound
threading from the actual usermode sound component implementations. Minor
cleanup to CallSoundThread as we can deduce the thread handle from the
sound device instance.
Modified:
trunk/reactos/include/reactos/libs/sound/mmebuddy.h
trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c
trunk/reactos/lib/drivers/sound/mmebuddy/functiontable.c
trunk/reactos/lib/drivers/sound/mmebuddy/thread.c
trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c
Modified: trunk/reactos/include/reactos/libs/sound/mmebuddy.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/sound…
==============================================================================
--- trunk/reactos/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Sun Feb 15 09:19:58 2009
@@ -376,7 +376,7 @@
MMRESULT
SetSoundDeviceFunctionTable(
IN PSOUND_DEVICE SoundDevice,
- IN PMMFUNCTION_TABLE FunctionTable OPTIONAL);
+ IN PMMFUNCTION_TABLE FunctionTable);
MMRESULT
GetSoundDeviceFunctionTable(
@@ -438,9 +438,8 @@
MMRESULT
CallSoundThread(
- IN PSOUND_THREAD Thread,
+ IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
IN SOUND_THREAD_REQUEST_HANDLER RequestHandler,
- IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance OPTIONAL,
IN PVOID Parameter OPTIONAL);
Modified: trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c [iso-8859-1] Sun Feb 15 09:19:58 2009
@@ -243,7 +243,7 @@
SND_ASSERT( FunctionTable->Close );
if ( FunctionTable->Close == NULL )
{
- /* Bad practice, really! If you can open, why not close?! */
+ /* This indicates bad practice, really! If you can open, why not close?! */
return MMSYSERR_NOTSUPPORTED;
}
Modified: trunk/reactos/lib/drivers/sound/mmebuddy/functiontable.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmebuddy/functiontable.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmebuddy/functiontable.c [iso-8859-1] Sun Feb 15 09:19:58 2009
@@ -18,26 +18,26 @@
/*
Attaches a function table to a sound device. Any NULL entries in this
table are automatically set to point to a default routine to handle
- the appropriate function. If NULL is passed as the function table itself,
- the entire function table will use only the default routines.
+ the appropriate function.
*/
MMRESULT
SetSoundDeviceFunctionTable(
IN PSOUND_DEVICE SoundDevice,
- IN PMMFUNCTION_TABLE FunctionTable OPTIONAL)
+ IN PMMFUNCTION_TABLE FunctionTable)
{
VALIDATE_MMSYS_PARAMETER( IsValidSoundDevice(SoundDevice) );
+ VALIDATE_MMSYS_PARAMETER( FunctionTable );
/* Zero out the existing function table (if present) */
ZeroMemory(&SoundDevice->FunctionTable, sizeof(MMFUNCTION_TABLE));
- if ( FunctionTable )
- {
- /* Fill in the client-supplied functions */
- CopyMemory(&SoundDevice->FunctionTable,
- FunctionTable,
- sizeof(MMFUNCTION_TABLE));
- }
+ if ( ! FunctionTable )
+ return MMSYSERR_INVALPARAM;
+
+ /* Fill in the client-supplied functions */
+ CopyMemory(&SoundDevice->FunctionTable,
+ FunctionTable,
+ sizeof(MMFUNCTION_TABLE));
return MMSYSERR_NOERROR;
}
Modified: trunk/reactos/lib/drivers/sound/mmebuddy/thread.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] Sun Feb 15 09:19:58 2009
@@ -175,6 +175,7 @@
/* Wake the thread up */
if ( ResumeThread(NewThread->Handle) == -1 )
{
+ SND_ERR(L"Failed to resume thread!\n");
CloseHandle(NewThread->Handle);
DestroySoundThreadEvents(NewThread->Events.Ready,
NewThread->Events.Request,
@@ -199,13 +200,15 @@
MMRESULT
CallSoundThread(
- IN PSOUND_THREAD Thread,
+ IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
IN SOUND_THREAD_REQUEST_HANDLER RequestHandler,
- IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance OPTIONAL,
IN PVOID Parameter OPTIONAL)
{
- VALIDATE_MMSYS_PARAMETER( Thread );
+ VALIDATE_MMSYS_PARAMETER( SoundDeviceInstance );
VALIDATE_MMSYS_PARAMETER( RequestHandler );
+
+ /* TODO: Don't call this directly? */
+ PSOUND_THREAD Thread = SoundDeviceInstance->Thread;
SND_TRACE(L"Waiting for READY event\n");
WaitForSingleObject(Thread->Events.Ready, INFINITE);
Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1] Sun Feb 15 09:19:58 2009
@@ -13,6 +13,62 @@
#include <mmddk.h>
#include <ntddsnd.h>
#include <mmebuddy.h>
+
+
+/*
+ This structure gets used locally within functions as a way to shuttle data
+ to the sound thread. It's safe to use locally since CallSoundThread will
+ not return until the operation has been carried out.
+*/
+
+typedef struct
+{
+ MMWAVEHEADER_FUNC Function;
+ PWAVEHDR Header;
+} THREADED_WAVEHEADER_PARAMETERS;
+
+
+/*
+ Helper routines to simplify the call to the sound thread for the header
+ functions.
+*/
+
+MMRESULT
+WaveHeaderOperationInSoundThread(
+ PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
+ IN PVOID Parameter)
+{
+ THREADED_WAVEHEADER_PARAMETERS* Parameters = (THREADED_WAVEHEADER_PARAMETERS*) Parameter;
+ return Parameters->Function(SoundDeviceInstance, Parameters->Header);
+}
+
+MMRESULT
+WaveHeaderOperation(
+ MMWAVEHEADER_FUNC Function,
+ PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
+ PWAVEHDR Header)
+{
+ THREADED_WAVEHEADER_PARAMETERS Parameters;
+
+ Parameters.Function = Function;
+ Parameters.Header = Header;
+
+ return CallSoundThread(SoundDeviceInstance,
+ WaveHeaderOperationInSoundThread,
+ &Parameters);
+}
+
+
+/*
+ The following routines are basically handlers for:
+ - WODM_PREPARE
+ - WODM_UNPREPARE
+ - WODM_WRITE
+
+ All of these calls are ultimately dealt with in the context of the
+ appropriate sound thread, so the implementation should expect itself to
+ be running in this other thread when any of these operations take place.
+*/
MMRESULT
PrepareWaveHeader(
@@ -39,7 +95,9 @@
if ( ! FunctionTable->PrepareWaveHeader )
return MMSYSERR_NOTSUPPORTED;
- return FunctionTable->PrepareWaveHeader(SoundDeviceInstance, Header);
+ return WaveHeaderOperation(FunctionTable->PrepareWaveHeader,
+ SoundDeviceInstance,
+ Header);
}
MMRESULT
@@ -67,7 +125,9 @@
if ( ! FunctionTable->UnprepareWaveHeader )
return MMSYSERR_NOTSUPPORTED;
- return FunctionTable->UnprepareWaveHeader(SoundDeviceInstance, Header);
+ return WaveHeaderOperation(FunctionTable->UnprepareWaveHeader,
+ SoundDeviceInstance,
+ Header);
}
MMRESULT
@@ -95,6 +155,8 @@
if ( ! FunctionTable->SubmitWaveHeader )
return MMSYSERR_NOTSUPPORTED;
- return FunctionTable->SubmitWaveHeader(SoundDeviceInstance, Header);
+ return WaveHeaderOperation(FunctionTable->SubmitWaveHeader,
+ SoundDeviceInstance,
+ Header);
}
Author: cfinck
Date: Sat Feb 14 12:22:46 2009
New Revision: 39604
URL: http://svn.reactos.org/svn/reactos?rev=39604&view=rev
Log:
- Downgrade MinGW Runtime back to 3.13.
Using the complete 3.15.x package leads to building problems.
- Set the PATH variable again in RosBE-Builder.sh, otherwise GCC compilation fails
- Fix building "make" with RosBE-Builder.sh
- Delete the contents of the target directory before doing a reinstallation
- Delete the "$installdir/share" directory as well after compiling the stuff
- Update the README with the latest information
- Make the version.sh output nicer
- Minor tweaks in makepackage.sh to get the package built properly
- Update the SVN-Readme.txt files
Modified:
trunk/tools/RosBE/RosBE-Unix/Base-i386/README
trunk/tools/RosBE/RosBE-Unix/Base-i386/README.odt
trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/sources/SVN-Readme.txt
trunk/tools/RosBE/RosBE-Unix/SVN-Readme.txt
trunk/tools/RosBE/RosBE-Unix/makepackage.sh
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/README
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/R…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/README [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/README [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -36,10 +36,11 @@
The executable file and the package name are often called "flex".
* GNU GCC
- You need the GCC compiler, which is suitable for your system. The
+ You need a GCC compiler, which is suitable for your system. The
executable file and the package name are often called "gcc".
Your GCC compiler needs to be able to compile both C and C++ sources.
Therefore the "g++" module also has to be installed.
+ The compiler needs to be in version 3.4 or later.
* Grep
The executable file and the package name are often called "grep".
@@ -91,6 +92,12 @@
the shortcut.
+Uninstallation
+---------------
+ If you want to uninstall RosBE, just delete the entire installation directory
+and any shortcuts you have created.
+
+
Version Information
--------------------
This version of RosBE for Unix-based operating systems uses the following
@@ -115,7 +122,7 @@
NOTE: This GCC version only supports C and C++
* Make 20071219 (CVS version)
- * MinGW-Runtime 3.15.2
+ * MinGW-Runtime 3.13
* NASM, The Netwide assembler v2.05.01
* W32api 3.10
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/README.odt
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/R…
==============================================================================
Binary files - no diff available.
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/R…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -51,6 +51,7 @@
createdir=false
installdir=""
+reinstall=false
update=false
while [ "$installdir" = "" ]; do
@@ -94,7 +95,7 @@
echo "Please choose one of the following options:"
echo
echo " (U)pdate the existing Build Environment"
- echo " (R)einstall all new components of the Build Environment"
+ echo " (R)einstall all components of the Build Environment"
echo " (C)hoose a different installation directory"
echo
@@ -106,12 +107,18 @@
fi
done
- if [ "$choice" = "U" ] || [ "$choice" = "u" ]; then
- update=true
- elif [ "$choice" = "C" ] || [ "$choice" = "c" ]; then
- echo "Please enter another directory!"
- installdir=""
- fi
+ case "$choice" in
+ "U"|"u")
+ update=true
+ ;;
+ "R"|"r")
+ reinstall=true
+ ;;
+ "C"|"c")
+ echo "Please enter another directory!"
+ installdir=""
+ ;;
+ esac
else
echo "The directory \"$installdir\" is not empty. Do you really want to continue? (yes/no)"
read -p "[no] " answer
@@ -179,7 +186,6 @@
"1.1")
# Updated components from 1.1 to 1.4
process_binutils=true
- process_mingwruntime=true
process_nasm=true
# Reorganize the existing files
@@ -207,6 +213,11 @@
process_buildtime=true
process_scut=true
+ # Delete the contents of the current installation directory if we're reinstalling
+ if $reinstall; then
+ rm -rf "$installdir/"*
+ fi
+
# Create the directory if necessary
if $createdir; then
if ! mkdir -p "$installdir"; then
@@ -228,6 +239,9 @@
boldmsg "Building..."
mkdir "$installdir/bin" >& /dev/null
mkdir -p "$installdir/$TARGET_ARCH/mingw32" >& /dev/null
+
+# For compiling gcc, it needs to access the already compiled mingw32 binutils
+PATH="$installdir/$TARGET_ARCH/bin:$PATH"
# cpucount
if $process_cpucount; then
@@ -333,7 +347,7 @@
mkdir "make-build"
cd "make-build"
../make/configure --prefix="$installdir" --disable-dependency-tracking \
- --disable-nls --enable-case-insensitive-file-system
+ --disable-nls --enable-case-insensitive-file-system \
--disable-job-server --disable-rpath >& "$SCRIPTDIR/configure.log"
setup_check_run "configure"
@@ -407,6 +421,7 @@
fi
echo -n "Removing unneeded files... "
+rm -rf "$installdir/share"
rm -rf "$installdir/$TARGET_ARCH/mingw32/sys-include"
rm -rf "$installdir/$TARGET_ARCH/info"
rm -rf "$installdir/$TARGET_ARCH/man"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -6,10 +6,18 @@
#
# Released under GNU GPL v2 or any later version.
+source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
+
# Display RosBE version
echo "This is the ReactOS Build Environment for Unix-based Operating Systems"
-echo "Version $_ROSBE_VERSION, currently running with these components:"
+echo "Version $_ROSBE_VERSION"
+echo
+
+# Environment Information
+boldmsg "Environment Information"
+echo "Selected Target Architecture: $_ROSBE_ARCH"
echo
# Display tool versions
+boldmsg "Build Tools"
source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/version.sh"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/sources/SVN-Readme.txt
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/sources/SVN-Readme.txt [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/sources/SVN-Readme.txt [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -22,4 +22,4 @@
- w32api.tar.bz2
--> containing the "include" and "lib" subdirectories of the w32api package
- Source is available here: http://sourceforge.net/project/showfiles.php?group_id=2435
+ Source is available here: http://sourceforge.net/project/showfiles.php?group_id=2435
Modified: trunk/tools/RosBE/RosBE-Unix/SVN-Readme.txt
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/SVN-Readme.…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/SVN-Readme.txt [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/SVN-Readme.txt [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -6,5 +6,5 @@
It does not contain a fully functional Build Environment as some packages are
missing in the "sources" directory.
-You can download a full RosBE-Unix package from http://reactos.colinfinck.de
-(later on it will be downloadable from the official ReactOS Website)
+You can download a full RosBE-Unix package from
+http://sourceforge.net/project/showfiles.php?group_id=6553&package_id=308458
Modified: trunk/tools/RosBE/RosBE-Unix/makepackage.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/makepackage…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/makepackage.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/makepackage.sh [iso-8859-1] Sat Feb 14 12:22:46 2009
@@ -82,17 +82,16 @@
#
# The Process
#
-# Copy the directory and delete some stuff
+# Copy the directory, delete some stuff and set the permissions
+echo "Copying the \"$package_name\" directory..."
+rm -rf "$full_package_name"
cp -R "$package_name" "$full_package_name"
find "$full_package_name" -type d -name ".svn" | xargs rm -rf
+find "$full_package_name" -type f -name "SVN-Readme.txt" | xargs rm
rm "$full_package_name/README.odt"
-# Copy the source packages
-for source in $sources; do
- echo "Copying $source.tar.bz2..."
- cp "$package_name/sources/$source.tar.bz2" "$full_package_name/sources/$source.tar.bz2"
-done
+find "$full_package_name" -type f -name "*.sh" | xargs chmod +x
# Copy the shared tools
for tool in $tools; do