Dozens of California state prison inmates have been staging a hunger strike to protest conditions in solitary confinement units.