Jacek Caban (@jacek) commented about server/user.c:
allocated_handles = new_size;
entry = (user_entry_t *)handles + nb_handles;
generation = 1;
}nb_handles++;
- handle = &handles[nb_handles++];
- handle->generation = 0;
- return handle;
- if (generation == 0 || generation == 0xffff) generation = 1;
- WriteRelease64( &entry->offset, -1 );
- WriteRelease( &entry->tid, get_thread_id( current ) );
- WriteRelease( &entry->pid, get_process_id( current->process ) );
- WriteRelease64( &entry->padding, -1 );
- WriteRelease64( &entry->uniq, MAKELONG(type, generation) );
Do we need those `WriteRelease*` for all fields? Unless I'm missing something, using it for `uniq` should be enough. Similar question for reading.