The probability for compound-nucleus x-ray production P,.,,,~ in atomic collisions where long-lived compound nuclei are formed is calculated using the second-order distorted wave Born Approximation. The results are compared with a semi-classical formula which relates P,.nx to the product of the K-vacancy decay rate F K, the compoundnucleus lifetime r, the probability of creating a K vacancy on the incoming part of the collision, and the fraction of reaction products li.,, that have formed a compound nucleus. For an isolated resonance, we find that r is just the inverse of the resonance width F, and for the compound-nucleus reactions involving many unresolved resonances, r is the inverse of the Erison correlation width F c. For isobaric analog resonances Q is expected to be larger on resonance than off resonance. The fraction of reaction products/~,, is given in terms of squares of complex reaction amplitudes.