NanoLog icon indicating copy to clipboard operation
NanoLog copied to clipboard

Can authors write guides to introduce how we can use this project in the Windows environment?

Open thingsareright opened this issue 5 years ago • 4 comments

Can authors make a instruction so as to guide other programmers to use tihis project in the Windows environment?

thingsareright avatar Jul 01 '20 02:07 thingsareright

Hi thingsareright,

Unfortunately, the project only supports Linux right now, and I've updated the README.md to reflect this.

However, I believe the only incompatibilities with Windows are NanoLog's usage of POSIX AIO/threads and the assembly rdstc instruction (which can be replaced with std::high_resolution_clock). If you like to make a port and submit it as a pull-request, I would be happy to accept it.

Best Regards, Stephen Yang

syang0 avatar Jul 01 '20 21:07 syang0

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}




    
        
    


    Hi  Dear Mr Yang,
        NanoLog is a greate project, thank you for your reply!Best Wishes,Erwin Smith

    
    

    


On 7/2/2020 05:57,syang0<[email protected]> wrote: 

Hi thingsareright, Unfortunately, the project only supports Linux right now, and I've updated the README.md to reflect this. However, I believe the only incompatibilities with Windows are NanoLog's usage of POSIX AIO/threads and the assembly rdstc instruction (which can be replaced with std::high_resolution_clock). If you like to make a port and submit it as a pull-request, I would be happy to accept it. Best Regards, Stephen Yang

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

thingsareright avatar Jul 02 '20 01:07 thingsareright

What were the reasons for using posix AIO? Asynchrony is emulated. This doesn't look optimal (just open the glibc code to make sure). In musl in General each operation will create its own thread

Roman-Koshelev avatar Nov 15 '20 20:11 Roman-Koshelev

Hi Roman-Koshelev,

The decision was made long ago, so I may not remember all the details. However, I believe posix AIO was originally chosen because it was more convenient at the time.

The only other option I had considered back then was the kernel's libaio, but that had requirements about memory alignment and (I think) performed a memory copy in the calling thread. For posix AIO, all I had to do was give it the pointer and byte size of a buffer, and the library would handle the rest; so I chose posix AIO.

Best Regards, Stephen Yang

syang0 avatar Nov 21 '20 14:11 syang0