Breivik has been declared mentally unfit for prison and will most likely end up in forced mental care. While the courts can still sentence him to prison, they rarely do, so. Also there is a chance that quality control group will find fault with the diagnosis, but again, it usually doesn't happen. He can be held there technically indefinitely, or just for some years, depends on his mental state.
For those who think he'll get off easy, consider this, he saw himself as basically a savior of the west, a man who took the necessary hard choices, killing some to save the rest. A martyr, soldier and hero in his head, now declared to be suffering from paranoid schizophrenia.
I can hardly think of a worse punishment.
Checking out seems not to do much.