local_irq_restore(flags);}/** * __relay_write - write data into the channel * @chan: relay channel * @data: data to be written * @length: number of bytes to write * * Writes data into the current cpu's channel buffer. * * Protects the buffer by disabling preemption. Use * relay_write() if you might be logging from interrupt * context. */staticinlinevoid__relay_write(struct rchan *chan,const void*data,size_t length){struct rchan_buf *buf;
buf = chan->buf[get_cpu()];if(unlikely(buf->offset + length > buf->chan->subbuf_size))
length =relay_switch_subbufv2.6.37-rc3