lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


GPL for an intrinsic? There are libraries already and if not the function itself is easy in C/C++ using asm or builtin functions in case of MSVC
On 18 Feb 2023, 15:37 +0300, Ranier Vilela <ranier.vf@gmail.com>, wrote:
Em sex., 17 de fev. de 2023 às 20:27, Sean Conner <sean@conman.org> escreveu:
It was thus said that the Great Luiz Henrique de Figueiredo once stated:
> Can we please go back to discussing Lua? Thanks.

  Sure.  Here's a Lua module I wrote for 32-bit x86 (Linux in particular,
using nasm, but it could be adopted for other operating systems).  It's a
wrapper around the x86 instruction RDTSC (ReaD TimeStamp Counter) with as
minimal overhead as possible:

;***************************************************************************
;
; Copyright 2020 by Sean Conner.
;
; This library is free software; you can redistribute it and/or modify it
; under the terms of the GNU Lesser General Public License as published by
; the Free Software Foundation; either version 3 of the License, or (at your
; option) any later version.
;
; This library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
; License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this library; if not, see <http://www.gnu.org/licenses/>.
Lua licenses is MIT or BSD:
https://www.lua.org/license.html

I think this code is useless for most Lua users, unfortunately.
IMHO, GPL is not welcome.

regards,
Ranier Vilela