Skip to content

Instantly share code, notes, and snippets.

View markmarch's full-sized avatar

Xiaoming Jia markmarch

View GitHub Profile
int add_count(unsigned long delta)
{
int c;
int cm;
int old;
int new;
do {
split_counterandmax(&counterandmax, &old, &c, &cm);
if (delta > MAX_COUNTERMAX || c + delta > cm)