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

Re: [Minios-devel] [UNIKRAFT PATCH v3 1/3] lib/uktime: Introduce POSIX timer stubs



Okay, great. Thanks!

Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 17.02.20 17:15, Stefan Teodorescu wrote:
Sure, you can change the header, I have just copy pasted it from another file.

Thanks,
Stefan

On Mon, 17 Feb 2020 at 18:04, Simon Kuenzer <simon.kuenzer@xxxxxxxxx <mailto:simon.kuenzer@xxxxxxxxx>> wrote:

    Hi, this looks good. I have just one question to the header.

    Thanks,

    Simon

    On 14.02.20 16:41, stefanl.teodorescu@xxxxxxxxx
    <mailto:stefanl.teodorescu@xxxxxxxxx> wrote:
     > From: Costin Lupu <costin.lupu@xxxxxxxxx
    <mailto:costin.lupu@xxxxxxxxx>>
     >
     > We simply introduce the stubs for these functions. They will have
    to be
     > implemented later, therefore we do not add any license for now.
     >
     > Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx
    <mailto:costin.lupu@xxxxxxxxx>>
     > Signed-off-by: Stefan Teodorescu <stefanl.teodorescu@xxxxxxxxx
    <mailto:stefanl.teodorescu@xxxxxxxxx>>
     > ---
     >   lib/uktime/Makefile.uk   |  1 +
     >   lib/uktime/exportsyms.uk <http://exportsyms.uk> |  5 +++
     >   lib/uktime/timer.c       | 80
    ++++++++++++++++++++++++++++++++++++++++
     >   3 files changed, 86 insertions(+)
     >   create mode 100644 lib/uktime/timer.c
     >
     > diff --git a/lib/uktime/Makefile.uk b/lib/uktime/Makefile.uk
     > index 47fbb4b3..2976a10f 100644
     > --- a/lib/uktime/Makefile.uk
     > +++ b/lib/uktime/Makefile.uk
     > @@ -11,3 +11,4 @@ LIBUKTIME_SRCS-y +=
    $(LIBUKTIME_BASE)/musl-imported/src/timegm.c
     >   LIBUKTIME_SRCS-y +=
    $(LIBUKTIME_BASE)/musl-imported/src/__tm_to_secs.c
     >   LIBUKTIME_SRCS-y +=
    $(LIBUKTIME_BASE)/musl-imported/src/__year_to_secs.c
     >   LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/time.c
     > +LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/timer.c
     > diff --git a/lib/uktime/exportsyms.uk <http://exportsyms.uk>
    b/lib/uktime/exportsyms.uk <http://exportsyms.uk>
     > index bd9c49cf..82b70b7f 100644
     > --- a/lib/uktime/exportsyms.uk <http://exportsyms.uk>
     > +++ b/lib/uktime/exportsyms.uk <http://exportsyms.uk>
     > @@ -9,3 +9,8 @@ timegm
     >   times
     >   usleep
     >   utime
     > +timer_create
     > +timer_delete
     > +timer_settime
     > +timer_gettime
     > +timer_getoverrun
     > diff --git a/lib/uktime/timer.c b/lib/uktime/timer.c
     > new file mode 100644
     > index 00000000..0c8db40d
     > --- /dev/null
     > +++ b/lib/uktime/timer.c
     > @@ -0,0 +1,80 @@
     > +/* SPDX-License-Identifier: BSD-3-Clause */
     > +/*
     > + * Authors: Costin Lupu <costin.lupu@xxxxxxxxx
    <mailto:costin.lupu@xxxxxxxxx>>
     > + *
     > + * Copyright (c) 2019, University Politehnica of Bucharest. All
    rights reserved.
     > + *
     > + * Redistribution and use in source and binary forms, with or
    without
     > + * modification, are permitted provided that the following
    conditions
     > + * are met:
     > + *
     > + * 1. Redistributions of source code must retain the above copyright
     > + *    notice, this list of conditions and the following disclaimer.
     > + * 2. Redistributions in binary form must reproduce the above
    copyright
     > + *    notice, this list of conditions and the following
    disclaimer in the
     > + *    documentation and/or other materials provided with the
    distribution.
     > + * 3. Neither the name of the copyright holder nor the names of its
     > + *    contributors may be used to endorse or promote products
    derived from
     > + *    this software without specific prior written permission.
     > + *
     > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    CONTRIBUTORS "AS IS"
     > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE
     > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    PARTICULAR PURPOSE
     > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
    CONTRIBUTORS BE
     > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    EXEMPLARY, OR
     > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF
     > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    OR BUSINESS
     > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    WHETHER IN
     > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    OTHERWISE)
     > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    ADVISED OF THE
     > + * POSSIBILITY OF SUCH DAMAGE.
     > + *
     > + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.

    I know that you probably copied this license header from another file
    but we noticed that this sentence is probably in conflict with the
    license ahead. Can this be removed? With your okay, I would do it for
    you while upstreaming.

     > + */
     > +
     > +#include <errno.h>
     > +#include <time.h>
     > +#include <uk/essentials.h>
     > +#include <uk/print.h>
     > +
     > +
     > +int timer_create(clockid_t clockid __unused,
     > +             struct sigevent *__restrict sevp __unused,
     > +             timer_t *__restrict timerid __unused)
     > +{
     > +     WARN_STUBBED();
     > +     errno = ENOTSUP;
     > +     return -1;
     > +}
     > +
     > +int timer_delete(timer_t timerid __unused)
     > +{
     > +     WARN_STUBBED();
     > +     errno = ENOTSUP;
     > +     return -1;
     > +}
     > +
     > +int timer_settime(timer_t timerid __unused,
     > +             int flags __unused,
     > +             const struct itimerspec *__restrict new_value __unused,
     > +             struct itimerspec *__restrict old_value __unused)
     > +{
     > +     WARN_STUBBED();
     > +     errno = ENOTSUP;
     > +     return -1;
     > +}
     > +
     > +int timer_gettime(timer_t timerid __unused,
     > +             struct itimerspec *curr_value __unused)
     > +{
     > +     WARN_STUBBED();
     > +     errno = ENOTSUP;
     > +     return -1;
     > +}
     > +
     > +int timer_getoverrun(timer_t timerid __unused)
     > +{
     > +     WARN_STUBBED();
     > +     errno = ENOTSUP;
     > +     return -1;
     > +}
     >


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.