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.
--HPS _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"