On Feb 16, 2012, at 11:45 PM, Julian Elischer wrote: *snip* >> The message buffer does not have to be a chunk of memory that >> we circularly scribble to. It can be a per-cpu linked list of >> messages even. *snip*
> that is an intersting thought.. though.. how would you sort them into order > for > printing? > > maybe a single atomic 64 bit int that is incremented per message. Yes. Though, a timestamp should do the trick as well. In a multi-core system, you won't have pure or absolute sequentially anymore. For messages that are "printed" at the proverbial "same time" on different cores, ordering is very hard, if not impossible, to determine. A single atomic counter would force sequentially, but would effectively introduce serialization, just like locking, and would make a per-cpu message buffer/list/whatever less useful. The theory: the closer in time independent messages are printed (on different cores), the least important their ordering becomes. -- Marcel Moolenaar mar...@xcllnt.net _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"