sync: Fail with init semaphore count < 0
sync: Fail with init semaphore count < 0

Semaphores are not currently designed to handle this case correctly, leading to
very strange behavior. Semaphores as written are intended to count *resources*
and it's not possible to have a negative number of resources.

This alters the behavior and documentation to note that the task will be failed
if the initial count is 0.

Closes #15758

untitaker/rust,vhbit/rust,mdinger/rust,jbclements/rust,dwillmer/rust,sae-bom/rust,bombless/rust-docs-chinese,aneeshusa/rust,zachwick/rust,XMPPwocky/rust,aepsil0n/rust,0x73/rust,seanrivera/rust,zubron/rust,ruud-v-a/rust,kwantam/rust,rprichard/rust,defuz/rust,ejjeong/rust,sae-bom/rust,rprichard/rust,defuz/rust,aidancully/rust,ejjeong/rust,l0kod/rust,miniupnp/rust,pczarn/rust,aidancully/rust,nham/rust,zachwick/rust,pczarn/rust,aidancully/rust,zachwick/rust,defuz/rust,miniupnp/rust,quornian/rust,jroesch/rust,TheNeikos/rust,krzysz00/rust,rohitjoshi/rust,hauleth/rust,nham/rust,XMPPwocky/rust,bombless/rust,jroesch/rust,aepsil0n/rust,barosl/rust,aepsil0n/rust,kimroen/rust,dinfuehr/rust,ebfull/rust,aneeshusa/rust,quornian/rust,mihneadb/rust,zubron/rust,nwin/rust,richo/rust,TheNeikos/rust,P1start/rust,P1start/rust,vhbit/rust,krzysz00/rust,AerialX/rust-rt-minimal,0x73/rust,ebfull/rust,aidancully/rust,mvdnes/rust,jashank/rust,krzysz00/rust,P1start/rust,nwin/rust,kwantam/rust,kwantam/rust,philyoon/rust,quornian/rust,GBGamer/rust,0x73/rust,GBGamer/rust,victorvde/rust,reem/rust,rohitjoshi/rust,GBGamer/rust,ktossell/rust,gifnksm/rust,omasanori/rust,P1start/rust,emk/rust,dinfuehr/rust,AerialX/rust,pczarn/rust,robertg/rust,zubron/rust,P1start/rust,richo/rust,barosl/rust,pshc/rust,jashank/rust,jbclements/rust,robertg/rust,rprichard/rust,ebfull/rust,aepsil0n/rust,aidancully/rust,barosl/rust,vhbit/rust,ruud-v-a/rust,omasanori/rust,erickt/rust,TheNeikos/rust,emk/rust,carols10cents/rust,zaeleus/rust,nwin/rust,0x73/rust,philyoon/rust,GBGamer/rust,ejjeong/rust,nham/rust,defuz/rust,graydon/rust,jroesch/rust,miniupnp/rust,seanrivera/rust,mihneadb/rust,ruud-v-a/rust,pelmers/rust,mihneadb/rust,jashank/rust,reem/rust,pshc/rust,robertg/rust,omasanori/rust,sae-bom/rust,nwin/rust,mvdnes/rust,zachwick/rust,XMPPwocky/rust,bombless/rust,jbclements/rust,victorvde/rust,GBGamer/rust,l0kod/rust,zubron/rust,dwillmer/rust,emk/rust,pshc/rust,zaeleus/rust,seanrivera/rust,andars/rust,XMPPwocky/rust,vhbit/rust,GBGamer/rust,aepsil0n/rust,KokaKiwi/rust,pshc/rust,dwillmer/rust,AerialX/rust,victorvde/rust,robertg/rust,gifnksm/rust,ejjeong/rust,pelmers/rust,rprichard/rust,AerialX/rust,graydon/rust,hauleth/rust,mahkoh/rust,nham/rust,aneeshusa/rust,KokaKiwi/rust,quornian/rust,nham/rust,reem/rust,nwin/rust,rprichard/rust,kimroen/rust,nwin/rust,vhbit/rust,pshc/rust,kwantam/rust,jroesch/rust,andars/rust,erickt/rust,victorvde/rust,quornian/rust,zubron/rust,cllns/rust,erickt/rust,pelmers/rust,zubron/rust,kwantam/rust,GBGamer/rust,miniupnp/rust,mdinger/rust,KokaKiwi/rust,defuz/rust,philyoon/rust,jroesch/rust,pczarn/rust,richo/rust,defuz/rust,graydon/rust,reem/rust,erickt/rust,dinfuehr/rust,zaeleus/rust,jashank/rust,ktossell/rust,robertg/rust,hauleth/rust,graydon/rust,victorvde/rust,richo/rust,erickt/rust,jashank/rust,ktossell/rust,barosl/rust,dinfuehr/rust,cllns/rust,KokaKiwi/rust,omasanori/rust,l0kod/rust,philyoon/rust,zachwick/rust,cllns/rust,gifnksm/rust,zaeleus/rust,pshc/rust,pshc/rust,rohitjoshi/rust,mdinger/rust,dwillmer/rust,cllns/rust,rohitjoshi/rust,reem/rust,pelmers/rust,emk/rust,vhbit/rust,victorvde/rust,ruud-v-a/rust,TheNeikos/rust,ktossell/rust,KokaKiwi/rust,jbclements/rust,kimroen/rust,erickt/rust,mihneadb/rust,miniupnp/rust,l0kod/rust,bombless/rust,robertg/rust,jashank/rust,untitaker/rust,mvdnes/rust,graydon/rust,pczarn/rust,rohitjoshi/rust,mdinger/rust,AerialX/rust-rt-minimal,AerialX/rust,pczarn/rust,avdi/rust,carols10cents/rust,AerialX/rust-rt-minimal,richo/rust,nwin/rust,AerialX/rust,aneeshusa/rust,andars/rust,mahkoh/rust,miniupnp/rust,ebfull/rust,dwillmer/rust,mdinger/rust,rprichard/rust,zachwick/rust,ktossell/rust,untitaker/rust,AerialX/rust-rt-minimal,barosl/rust,emk/rust,aneeshusa/rust,gifnksm/rust,quornian/rust,mvdnes/rust,erickt/rust,P1start/rust,cllns/rust,AerialX/rust-rt-minimal,ruud-v-a/rust,aneeshusa/rust,nham/rust,philyoon/rust,aepsil0n/rust,P1start/rust,TheNeikos/rust,avdi/rust,zaeleus/rust,AerialX/rust,jashank/rust,ejjeong/rust,carols10cents/rust,avdi/rust,seanrivera/rust,ebfull/rust,untitaker/rust,andars/rust,mihneadb/rust,pelmers/rust,mvdnes/rust,jroesch/rust,krzysz00/rust,bombless/rust,dinfuehr/rust,gifnksm/rust,emk/rust,seanrivera/rust,omasanori/rust,pczarn/rust,nham/rust,cllns/rust,l0kod/rust,jbclements/rust,KokaKiwi/rust,mahkoh/rust,kimroen/rust,dwillmer/rust,avdi/rust,aidancully/rust,andars/rust,ebfull/rust,l0kod/rust,carols10cents/rust,richo/rust,AerialX/rust-rt-minimal,mahkoh/rust,0x73/rust,ktossell/rust,omasanori/rust,jbclements/rust,zaeleus/rust,graydon/rust,emk/rust,bombless/rust,barosl/rust,rohitjoshi/rust,GBGamer/rust,mahkoh/rust,zubron/rust,hauleth/rust,dwillmer/rust,jbclements/rust,krzysz00/rust,dwillmer/rust,miniupnp/rust,philyoon/rust,miniupnp/rust,mdinger/rust,sae-bom/rust,avdi/rust,andars/rust,ktossell/rust,quornian/rust,jbclements/rust,carols10cents/rust,sae-bom/rust,reem/rust,mahkoh/rust,XMPPwocky/rust,untitaker/rust,hauleth/rust,mihneadb/rust,avdi/rust,l0kod/rust,kwantam/rust,dinfuehr/rust,sae-bom/rust,hauleth/rust,kimroen/rust,gifnksm/rust,carols10cents/rust,kimroen/rust,mvdnes/rust,krzysz00/rust,ruud-v-a/rust,jroesch/rust,zubron/rust,seanrivera/rust,pshc/rust,TheNeikos/rust,jbclements/rust,bombless/rust,vhbit/rust,untitaker/rust,vhbit/rust,0x73/rust,jroesch/rust,jashank/rust,l0kod/rust,nwin/rust,XMPPwocky/rust,ejjeong/rust,kimroen/rust,barosl/rust,pelmers/rust,0x73/rust