In file sys/kern/kern_thr.c in function thread_create when cheking parametr rtp for it validity, value RTP_PRIO_IDLE processed like incorrect and function return EINVAL. As i see it, this is a bug. Because it is possible setup any other sheduler priority, except RTP_PRIO_ITHD (what is logicaly).
It looks like libthr does not have any support for RTP_PRIO_IDLE either. Perhaps this is because the risk of a non-idle thread getting blocked by an idle thread is high (for example, if an idle thread has locked data structures used by malloc()).
A workaround is possible by calling rtprio_thread() manually using the id from pthread_getthreadid_np().
I write not about any libs, i write about syscall interface. Impossible to create new thread with priority that i like looks alogicaly. If we already have parameter that allow select wanted priority, so why we must use it ONLY for RT-class, but no for all others?
Workaround is very simple, but better if we can do it without any ugly crutches.