| 456 | } |
| 457 | |
| 458 | void connSetThreadAffinity(connection *conn, int cpu) { |
| 459 | #ifdef HAVE_SO_INCOMING_CPU |
| 460 | if (setsockopt(conn->fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, sizeof(cpu)) != 0) |
| 461 | { |
| 462 | serverLog(LL_WARNING, "Failed to set socket affinity"); |
| 463 | } |
| 464 | #else |
| 465 | (void)conn; |
| 466 | (void)cpu; |
| 467 | #endif |
| 468 | } |
| 469 | |
| 470 | /* Return a text that describes the connection, suitable for inclusion |
| 471 | * in CLIENT LIST and similar outputs. |
no test coverage detected