Changeset bc73be3 in mainline for uspace/app/hbench/ipc/ns_ping.c


Ignore:
Timestamp:
2019-06-27T08:51:20Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8add15e0
Parents:
ad40b74b (diff), aeba767 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

cpp: merge and resolve conflicts

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/hbench/ipc/ns_ping.c

    rad40b74b rbc73be3  
    11/*
    2  * Copyright (c) 2012 Petr Koupy
    3  * Copyright (c) 2014 Martin Sucha
     2 * Copyright (c) 2018 Jiri Svoboda
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 /** @addtogroup draw
     29/** @addtogroup hbench
    3130 * @{
    3231 */
    33 /**
    34  * @file
    35  */
    3632
    37 #ifndef DRAW_FONT_BITMAP_BACKEND_H_
    38 #define DRAW_FONT_BITMAP_BACKEND_H_
     33#include <stdio.h>
     34#include <ns.h>
     35#include <async.h>
     36#include <errno.h>
     37#include <str_error.h>
     38#include "../hbench.h"
    3939
    40 #include <stdint.h>
     40static bool runner(bench_env_t *env, bench_run_t *run, uint64_t niter)
     41{
     42        bench_run_start(run);
    4143
    42 #include "../font.h"
    43 #include "../surface.h"
    44 #include "../source.h"
     44        for (uint64_t count = 0; count < niter; count++) {
     45                errno_t rc = ns_ping();
    4546
    46 typedef struct {
    47         errno_t (*resolve_glyph)(void *, const wchar_t, glyph_id_t *);
    48         errno_t (*load_glyph_surface)(void *, glyph_id_t, surface_t **);
    49         errno_t (*load_glyph_metrics)(void *, glyph_id_t, glyph_metrics_t *);
    50         void (*release)(void *);
    51 } bitmap_font_decoder_t;
     47                if (rc != EOK) {
     48                        return bench_run_fail(run, "failed sending ping message: %s (%d)",
     49                            str_error(rc), rc);
     50                }
     51        }
    5252
    53 extern errno_t bitmap_font_create(bitmap_font_decoder_t *, void *, uint32_t,
    54     font_metrics_t, uint16_t, font_t **);
     53        bench_run_stop(run);
    5554
    56 #endif
     55        return true;
     56}
     57
     58benchmark_t benchmark_ns_ping = {
     59        .name = "ns_ping",
     60        .desc = "Name service IPC ping-pong benchmark",
     61        .entry = &runner,
     62        .setup = NULL,
     63        .teardown = NULL
     64};
    5765
    5866/** @}
Note: See TracChangeset for help on using the changeset viewer.