--- nono/host/netdriver.cpp 2026/04/29 17:04:30 1.1.1.2 +++ nono/host/netdriver.cpp 2026/04/29 17:04:33 1.1.1.3 @@ -1,20 +1,21 @@ // // nono -// Copyright (C) 2019 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // -#include "header.h" #include "netdriver.h" #include "mainapp.h" #include "mystring.h" +#include "mythread.h" static void *netdriver_run(void *); std::unique_ptr gNetDriver; // コンストラクタ -NetDriver::NetDriver(const char *name, EthernetDevice *p, - std::mutex *m, std::condition_variable *c) +NetDriver::NetDriver(const char *drivername_, EthernetDevice *parent_, + std::mutex *mtx_, std::condition_variable *cv_) { logname = "netdriver"; devname = "NetDriver"; @@ -22,10 +23,10 @@ NetDriver::NetDriver(const char *name, E monitor.Init(30, 7); fd = -1; - drivername = name; - parent = p; - mtx = m; - cv = c; + drivername = drivername_; + parent = parent_; + mtx = mtx_; + cv = cv_; } // デストラクタ @@ -64,7 +65,7 @@ NetDriver::InitRecvThread() void * netdriver_run(void *dummy) { - pthread_setname_np("netdriver"); + PTHREAD_SETNAME("netdriver"); pthread_detach(pthread_self()); gNetDriver->ThreadRun();