<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:WinThreadObj="http://cybox.mitre.org/objects#WinThreadObject-2" xmlns:cyboxCommon="http://cybox.mitre.org/common-2" xmlns:WinHandleObj="http://cybox.mitre.org/objects#WinHandleObject-2" targetNamespace="http://cybox.mitre.org/objects#WinThreadObject-2" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.1">
	<xs:annotation>
		<xs:documentation>This schema was originally developed by The MITRE Corporation. The CybOX XML Schema implementation is maintained by The MITRE Corporation and developed by the open CybOX Community. For more information, including how to get involved in the effort and how to submit change requests, please visit the CybOX website at http://cybox.mitre.org.</xs:documentation>
		<xs:appinfo>
			<schema>Win_Thread_Object</schema>
			<version>2.1</version>
			<date>01/22/2014</date>			
			<short_description>The following specifies the fields and types that compose this defined CybOX Object type. Each defined object is an extension of the abstract ObjectPropertiesType, defined in CybOX Common. For more information on this extension mechanism, please see the CybOX Specification. This document is intended for developers and assumes some familiarity with XML. </short_description>
			<terms_of_use>Copyright (c) 2012-2014, The MITRE Corporation. All rights reserved. The contents of this file are subject to the terms of the CybOX License located at http://cybox.mitre.org/about/termsofuse.html. See the CybOX License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the CybOX Schema, this license header must be included.</terms_of_use>
		</xs:appinfo>
	</xs:annotation>
	<xs:import namespace="http://cybox.mitre.org/common-2" schemaLocation="http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd"/>
	<xs:import namespace="http://cybox.mitre.org/objects#WinHandleObject-2" schemaLocation="http://cybox.mitre.org/XMLSchema/objects/Win_Handle/2.1/Win_Handle_Object.xsd"/>
	<xs:element name="Windows_Thread" type="WinThreadObj:WindowsThreadObjectType">
		<xs:annotation>
			<xs:documentation>The Windows_Threat object is intended to characterize Windows process threads. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684852(v=vs.85).aspx.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="WindowsThreadObjectType" mixed="false">
		<xs:annotation>
			<xs:documentation>The Windows_ThreadObjectType is intended to characterize Windows process threads. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684852(v=vs.85).aspx.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="cyboxCommon:ObjectPropertiesType">
				<xs:sequence>
					<xs:element name="Thread_ID" type="cyboxCommon:NonNegativeIntegerObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Represents the identifier of this thread. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683183(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Handle" type="WinHandleObj:WindowsHandleObjectType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Handle represents the handle of a specific thread. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Running_Status" type="WinThreadObj:ThreadRunningStatusType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Running Status represents the running state that the thread is in.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Context" type="cyboxCommon:StringObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The Context field specifies the thread context structure, which contains processor-specific register data.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Priority" type="cyboxCommon:UnsignedIntegerObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Represents the priority of the thread. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms685100(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Creation_Flags" type="cyboxCommon:HexBinaryObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The Creation flags field represents the creation flags that a thread may be launched with. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Creation_Time" type="cyboxCommon:DateTimeObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Creation time represents the creation time of the thread.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Start_Address" type="cyboxCommon:HexBinaryObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Start address represents the start address of this thread, representing the memory address where this thread should start. See Also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Parameter_Address" type="cyboxCommon:HexBinaryObjectPropertyType" minOccurs="0"/>
					<xs:element name="Security_Attributes" type="cyboxCommon:StringObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Security attributes represents the security attributes for the thread. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa379560(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Stack_Size" type="cyboxCommon:NonNegativeIntegerObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Represents the stack size of the thread. See also: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686774(v=vs.85).aspx.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="ThreadRunningStatusType">
		<xs:annotation>
			<xs:documentation>ThreadRunningStatusType specifies Windows thread running states via a union of the ThreadRunningStatusEnum type and the atomic xs:string type. Its base type is the CybOX Core BaseObjectPropertyType, for permitting complex (i.e. regular-expression based) specifications.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="cyboxCommon:BaseObjectPropertyType">
				<xs:simpleType>
					<xs:union memberTypes="WinThreadObj:ThreadRunningStatusEnum xs:string"/>
				</xs:simpleType>
				<xs:attribute name="datatype" type="cyboxCommon:DatatypeEnum" fixed="string">
					<xs:annotation>
						<xs:documentation>This attribute is optional and specifies the expected type for the value of the specified property.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="ThreadRunningStatusEnum">
		<xs:annotation>
			<xs:documentation>Thread running status enumerates the various states that a thread may be in before, during, or after execution. See http://msdn.microsoft.com/en-us/library/system.diagnostics.threadstate(v=vs.110).aspx.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="Initialized">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread has been initialized, but has not yet started.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Ready">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread is waiting to use a processor because no processor is free. The thread is prepared to run on the next available processor.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Running">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread is currently using a processor.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Standby">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread is about to use a processor. Only one thread can be in this state at a time.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Terminated">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread has finished executing and has exited.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Waiting">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread is not ready to use the processor because it is waiting for a peripheral operation to complete or a resource to become free. When the thread is ready, it will be rescheduled.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Transition">
				<xs:annotation>
					<xs:documentation>A state that indicates the thread is waiting for a resource, other than the processor, before it can execute.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Unknown">
				<xs:annotation>
					<xs:documentation>The thread of the thread is unknown.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
