/* When the buffer fills up discard new entries. Assume that the earlier errors are the more interesting. */ if (entry >= MCE_LOG_LEN) { set_bit(MCE_OVERFLOW, &mcelog.flags); return; 
for (;;) { /* When the buffer fills up discard new entries. Assume that the earlier errors are the more interesting. */ if (entry >= MCE_LOG_LEN) { set_bit(MCE_OVERFLOW, &mcelog.flags); return; } /* Old left over entry. Skip. */ if (mcelog.entry[entry].finished) { entry++; continue; } 
void mce_log(struct mce *mce){	unsigned next, entry;	mce->finished = 0;	smp_wmb();	for (;;) {		entry = rcu_dereference(mcelog.next);		/* When the buffer fills up discard new entries. Assume 		   that the earlier errors are the more interesting. */		if (entry >= MCE_LOG_LEN) {			set_bit(MCE_OVERFLOW, &mcelog.flags);			return;		}		/* Old left over entry. Skip. */		if (mcelog.entry[entry].finished)			continue;		smp_rmb();		next = entry + 1;		if (cmpxchg(&mcelog.next, entry, next) == entry)			break;	}	memcpy(mcelog.entry + entry, mce, sizeof(struct mce));	smp_wmb();	mcelog.entry[entry].finished = 1;	smp_wmb();	if (!test_and_set_bit(0, &console_logged))		notify_user = 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/673242c10d535bfe238d9d8e82ac93432d35b88e/mce.c/clean/arch/x86_64/kernel/mce.c