Tag Archives: OpenBSD

fts(3) or Avoiding to Reinvent the Wheel

One of the C programs I was working on this weekend had to find all files that satisfy a certain predicate and add them to a list of “pending work”. The first thing that comes to mind is probably a custom opendir(), readdir(), closedir() hack. This is probably ok when one only has these structures, but it also a bit cumbersome. There are various sorts of DIR and dirent structures and recursing down a large path requires manually keeping track of a lot of state. Continue reading

Advertisement

Interesting times ahead for FreeBSD

Ed Schouten’s MPSAFE-tty layer is now in the main tree of FreeBSD, but it i only one of the active projects which run in parallel. The excellent news is that the MPSAFE-tty layer brings down by one the count of kernel subsystems that require the big Giant lock for running within the threaded FreeBSD kernel. There are only a few more, i.e. the USB stack. Removing the requirement for Giant from some of the remaining Giant-dependent subsystems is already part of ongoing work. Continue reading