On 29 March 2015 at 01:13, Hans Petter Selasky <h...@selasky.org> wrote: > On 03/28/15 20:16, Gleb Smirnoff wrote: >> >> +uint16_t >> +ip_newid(void) >> +{ >> + >> + counter_u64_add(V_ip_id, 1); >> + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); >> +} > > > Technically you would need to enter a critical section here, so that the > current process doesn't get swapped to a different CPU between the counter > add and the zpcpu_get.
+10000 here. You can get preempted and shifted to another CPU at almost any point in time you're not explicitly asking not to be. It's.. frustrating. -adrian _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"