thank all of you very much!
It seems that one of the easiest way to get such a behavior is to pass ZERO as threadId and expect thread with such a call being affined to a core you wish.
Of course there is another way to affine a thread to a core ( from Java PL ) but you have to decide upon cpu_set_t type substitution as well as its size.