SYNCHRONIZE_DRAIN (Windows Embedded CE 6.0)

1/5/2010

When you perform a build on a development workstation that has multiple processors, this creates the possibility that different Build Tool (Build.exe) threads might be running on different processors.

In this case, you must ensure that your build process is ordered so that Build.exe does not attempt to build a product without first building its dependencies.

If this macro is set to 1 in a directory's sources file, Build.exe finishes building all preceding directories before starting to build the directory.

However, Build.exe still builds in the order specified by the dirs entry in the parent directory's dirs file. This means that Build.exe waits for all preceding dirs entries to finish building before continuing to build the current directory.

For example, this macro definition allows you to ensure that all preceding library files are built before building the current directory, which depends on the previous libraries.

Use this macro, and the related SYNCHRONIZE_BLOCK macro, very sparingly. When encountered, these macros completely stall the build process until synchronization is complete.

If a directory uses this macro, list the directory last in its parent dirs file. For more information, see Dirs File.

The following code example shows how to use this macro.

SYNCHRONIZE_DRAIN=1

See Also

Concepts

Sources File
Build Tool
Windows Embedded CE Build Environment Tool