Author: tkreuzer
Date: Fri Feb 13 20:19:51 2015
New Revision: 66250
URL: http://svn.reactos.org/svn/reactos?rev=66250&view=rev
Log:
[CMAKE]
Add support for "module groups". These are meta targets that automatically include all targets using set_module_type() that are included between start_module_group(name) and end_module_group().
Modified:
trunk/reactos/cmake/CMakeMacros.cmake
Modified: trunk/reactos/cmake/CMakeMacros.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
==============================================================================
--- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Fri Feb 13 20:19:51 2015
@@ -550,9 +550,14 @@
message(STATUS "set_module_type : unparsed arguments ${__module_UNPARSED_ARGUMENTS}, module : ${MODULE}")
endif()
+ # Add the module to the module group list, if it is defined
+ if(DEFINED CURRENT_MODULE_GROUP)
+ set_property(GLOBAL APPEND PROPERTY ${CURRENT_MODULE_GROUP}_MODULE_LIST "${MODULE}")
+ endif()
+
# Set subsystem. Also take this as an occasion
# to error out if someone gave a non existing type
- if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll)
+ if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll)
OR (${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver) OR (${TYPE} STREQUAL kerneldll))
set(__subsystem native)
elseif(${TYPE} STREQUAL win32cui)
@@ -662,6 +667,21 @@
# do compiler specific stuff
set_module_type_toolchain(${MODULE} ${TYPE})
+endfunction()
+
+function(start_module_group __name)
+ if(DEFINED CURRENT_MODULE_GROUP)
+ message(FATAL_ERROR "CURRENT_MODULE_GROUP is already set ('${CURRENT_MODULE_GROUP}')")
+ endif()
+ set(CURRENT_MODULE_GROUP rostests PARENT_SCOPE)
+endfunction()
+
+function(end_module_group)
+ get_property(__modulelist GLOBAL PROPERTY ${CURRENT_MODULE_GROUP}_MODULE_LIST)
+ add_custom_target(${CURRENT_MODULE_GROUP})
+ foreach(__module ${__modulelist})
+ add_dependencies(${CURRENT_MODULE_GROUP} ${__module})
+ endforeach()
endfunction()
function(preprocess_file __in __out)
Author: hbelusca
Date: Fri Feb 13 16:16:28 2015
New Revision: 66248
URL: http://svn.reactos.org/svn/reactos?rev=66248&view=rev
Log:
[BASESRV]: Only SHUTDOWN_NORETRY can be set via Get/SetProcessShutdownParameters APIs.
Modified:
trunk/reactos/subsystems/win/basesrv/proc.c
Modified: trunk/reactos/subsystems/win/basesrv/proc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/pro…
==============================================================================
--- trunk/reactos/subsystems/win/basesrv/proc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win/basesrv/proc.c [iso-8859-1] Fri Feb 13 16:16:28 2015
@@ -288,7 +288,8 @@
ASSERT(CsrThread);
ShutdownParametersRequest->ShutdownLevel = CsrThread->Process->ShutdownLevel;
- ShutdownParametersRequest->ShutdownFlags = CsrThread->Process->ShutdownFlags;
+ /* Only SHUTDOWN_NORETRY flag is valid for this API. The other private flags are for CSRSRV/WINSRV only. */
+ ShutdownParametersRequest->ShutdownFlags = CsrThread->Process->ShutdownFlags & SHUTDOWN_NORETRY;
return STATUS_SUCCESS;
}
@@ -299,7 +300,15 @@
PCSR_THREAD CsrThread = CsrGetClientThread();
ASSERT(CsrThread);
+ /* Only SHUTDOWN_NORETRY flag is valid for this API. The other private flags are for CSRSRV/WINSRV only. */
+ if (ShutdownParametersRequest->ShutdownFlags & ~SHUTDOWN_NORETRY)
+ {
+ /* If there were other flags specified, fail the call */
+ return STATUS_INVALID_PARAMETER;
+ }
+
CsrThread->Process->ShutdownLevel = ShutdownParametersRequest->ShutdownLevel;
+ /* Notice that all the possible other private flags are reinitialized here */
CsrThread->Process->ShutdownFlags = ShutdownParametersRequest->ShutdownFlags;
return STATUS_SUCCESS;