Adapting across different mount systems has three limiting factors:
1. Obviously the mechanical differences of the bayonet or thread mount.
2. The register distance (the distance between lens mount and sensor/film plane for which you will get a sharp picture).
3. The diameter of the mount.
Generally it is easiest to adapt a lens from a system with a bigger register distance to a camera system with a smaller one. The bigger the difference, the more space you can use for the construction of the adapter.
If the register distance of the lens is smaller than that one of the camera, a glassless adapter would - at least - make a normal lens a macro only lens, and probably cause vignetting.
If the register distance of the lens is equal or nearly equal to that one of the camera, adapting sometimes is possible - if the diameter of the lens is smaller than the diameter of the camera system. That's why the M42-PK adapters are working. And this possibility also depends on how deep the lens will produde inside the camera (mirror damage possible).
Register distances are
Canon: 42.00 mm
Pentax K: 45.46 mm
Nikon F: 46.50 mm
So most SRL/DSLR lenses can easily get adapted to Canon and mirrorless systems (including rangefinders), but not vice versa.
Register distances and diameters you can find in the net, that's one:
Camera Mounts Sorted by Register