About FreeBSD syscall usage

John Baldwin jhb at freebsd.org
Thu Oct 22 12:47:06 UTC 2009


On Thursday 22 October 2009 4:20:32 am Yan, Yeqing wrote:
> Hi:
> 
> I’m from Intel China. Our project use FreeBSD 7.0. I have some question 
about syscall usage but I think mail to the wrong address before.
> 
> Is there having any doc or example about how to use these syscall?
> 
> 
> 
> kse_exit
> 
> kse_wakeup
> 
> kse_create
> 
> kse_thr_interrupt
> 
> kse_release
> 
> kse_switchin

These are used internally to implement pthreads when using KSE.  Probably the 
only useful documentation would be the source for libkse.

> I read $man kse, but I can not find any example about how to use it. I write 
some test codes to call these function but all these codes are failed.
> 
> 
> 
> mac_syscall
> 
> I read $man 3 mac, but I can not find the usage about mac_syscall function.

This one I am not sure of.

> thr_create
> 
> thr_suspend
> 
> thr_kill2

These are used by libpthread to implement pthreads (libthr in < 7.x).  The 
best documentation for these would be the source to libpthread as well.

> By the way, it is said “I think that KSE was used in 5.x and 6.x and then 
dropped in favor of a 1:1 threading model when 7.0 was released”
> 
> Does it mean the KSE syscall can be removed from FreeBSD 7.0?

It has been removed entirely from 8.0.  It is still present in 7, but it is 
deprecated and not the default.

-- 
John Baldwin


More information about the freebsd-hackers mailing list