I have used ChibiOS/RT with my Arduino SD library to log analog pins to an csv file on an SD card at 976 samples per second with four analog values per sample.
976 Hz is the tick value using the Ardunio timer. I used the Adruino ADC software for the avr 10-bit ADC.
The library and examples are here http://code.google.com/p/beta-lib/downloads/list the file is ChibiOS20111027.zip.
There are five examples:
chBlinkPrint - A simple example of three threads. A high priority thread
blinks an LED, a medium priority thread prints a counter
every second, and the low priority idle loop increments the
counter.
chContextTime - Test to determine context switch time with a semaphore.
chFastLogger - Data logger optimized for 328 Arduino. Logs two analog pins
every tick (1024 usec tick).
chJitter - Test of jitter in sleep for one tick.
chMegaLogger - Data logger optimized for Mega. Logs four analog pins
every tick (976 samples per sec, four values per sample)