// SPDX-License-Identifier: GPL-2.0 /* * This times how long it takes to bind to a port when the port already * has multiple sockets in its bhash table. * * In the setup(), we populate the port's bhash table with * MAX_THREADS * MAX_CONNECTIONS number of entries.
*/
/* Set up threads to populate the bhash table entry for the port */ for (i = 0; i < MAX_THREADS; i++)
pthread_create(&tid[i], NULL, setup, fd_array[i]);
for (i = 0; i < MAX_THREADS; i++)
pthread_join(tid[i], NULL);
if (ret) goto done;
begin = clock();
/* Bind to the same port on a different address */
sock_fd = bind_socket(0, bind_addr); if (sock_fd < 0) goto done;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.