Example #1
0
int sp_logeof(spfile *f)
{
    sp_filesvp(f);
    speofh eof = { SPEOF };
    int rc = sp_logwrite(f, &eof, sizeof(eof));
    if (spunlikely(rc == -1)) {
        sp_logrlb(f);
        return -1;
    }
    return 0;
}
Example #2
0
int sp_logeof(spfile *f)
{
	sp_filesvp(f);
	speofh eof = { SPEOF };
	sp_logadd(f, (char*)&eof, sizeof(eof));
	int rc = sp_logflush(f);
	if (spunlikely(rc == -1)) {
		sp_logrlb(f);
		return -1;
	}
	return 0;
}