The relations between the surface reaction probability β of an atom or a radical in a reactive gas discharge, its diffusive flux to the wall, spatial density profile and temporal density decay during the postdischarge, are examined. Then, the values of β for H, SiH3, and Si2H5 on a growing a-Si:H film, and CH3 and C2H5 on an a-C:H film are derived from the temporal decay of radical densities during the discharge afterglow by using time-resolved threshold ionization mass spectrometry. For SiH3 on a-Si:H, β=0.28±0.03 in excellent agreement with previous determinations using other experimental approaches, and for Si2H5, 0.1<β<0.3. For H on a-Si:H, 0.4<β<1 and mostly consists of surface recombination as H2, while the etching probability of Si as SiH4 is only ε≈0.03 at 350 K in good agreement with other studies of H reaction kinetics on crystalline silicon. At high dilution of SiH4 in H2 the sticking probabilities of Si hydride radicals are affected by the flux of H atoms of hydrogen ions which enhances surface recombination at the expense of sticking. For CH3 or C2H5 on a-C:H it is shown that β is not constant during the discharge afterglow, decreasing from about 0.01 down to 0.001. This reveals that chemisorption of these radicals on the H-saturated a-C:H surface is entirely governed by the competition between desorption and creation of active sites by ion bombardment or H atoms. The differences between the surface reaction kinetics of SiH3 on a-Si:H and CH3 on a-C:H are discussed within a unified model of precursor-mediated chemisorption.