On May 18, 3:40pm, charles.cui1...@gmail.com (Charles Cui) wrote: -- Subject: pthread library related
| Hi guys, | | | I spent some time on pthread libraries in netbsd which is a big part in | my project, and have some questions to ask. | Taking pthread_barrierattr_getpshared, pthread_barrierattr_setpshared | as an example. These functions are used to getting and setting barrierattr | data structure. netbsd has several fields in the data structure, while | freebsd has the only pshared field. I am wondering which fields in the | implementation of netbsd can be used as pshare in netbsd? | Following are definitions of netbsd vs freebsd, the same problems exist in | mutexattr, condattr and rwlockattr. Also are there any documents which | describe implementation details in netbsd? It would be great if we have. You can see how FreeBSD is implementing them; it is a lot of code to do this and would require some architectural review. The relevant files are: http://nxr.netbsd.org/xref/src-freebsd/lib/libthr/thread/thr_pshared.c http://nxr.netbsd.org/xref/src-freebsd/lib/libthr/thread/thr_barrierattr.c http://nxr.netbsd.org/xref/src-freebsd/sys/kern/kern_umtx.c We don't have such mutex functionality in our kernel. Implementing this would be a GSoC project in itself. christos