[ros-dev] [ros-diffs] [zhu] 71865: Structural, style, correctness fixes.

Thomas Faber thomas.faber at reactos.org
Sat Jul 9 07:43:29 UTC 2016


On 2016-07-08 19:52, zhu at svn.reactos.org wrote:
> --- branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c	[iso-8859-1] (original)
> +++ branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c	[iso-8859-1] Fri Jul  8 17:52:42 2016
> @@ -33,6 +33,8 @@
>  static LIST_ENTRY AddressListHead;
>  
>  /* implementation in testing */
> +/* Must already hold the Context->RequestListLock */
> +/* Context should be in ->FileObject->FsContext */

You know there is a way to actually tell that to MSVC's static
analyzer, right? ;)
You want something like
_IRQL_requires_(DISPATCH_LEVEL)
_IRQL_requires_same_
_Requires_lock_held_(((PTCP_CONTEXT)IrpSp->FileObject->FsContext)->RequestListLock)

The last one might be a little too complicated to actually include, but
the IRQL ones are easy to help indicate things like this.

>  NTSTATUS
>  PrepareIrpForCancel(
>  	PIRP Irp,




More information about the Ros-dev mailing list