aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_ucis.h
blob: 3f736a709fa2ff3729d8683da94e5b8440e979fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Copyright 2017 Jack Humbert
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef PROCESS_UCIS_H
#define PROCESS_UCIS_H

#include "quantum.h"
#include "process_unicode_common.h"

#ifndef UCIS_MAX_SYMBOL_LENGTH
#define UCIS_MAX_SYMBOL_LENGTH 32
#endif

typedef struct {
  char *symbol;
  char *code;
} qk_ucis_symbol_t;

typedef struct {
  uint8_t count;
  uint16_t codes[UCIS_MAX_SYMBOL_LENGTH];
  bool in_progress:1;
} qk_ucis_state_t;

extern qk_ucis_state_t qk_ucis_state;

#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}}
#define UCIS_SYM(name, code) {name, #code}

extern const qk_ucis_symbol_t ucis_symbol_table[];

void qk_ucis_start(void);
void qk_ucis_start_user(void);
void qk_ucis_symbol_fallback (void);
void register_ucis(const char *hex);
bool process_ucis (uint16_t keycode, keyrecord_t *record);

#endif
fair queueing" + def_bool y select NET_SCH_FIFO + select NET_SCH_FQ_CODEL ---help--- When the kernel has several packets to send out over a network device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1978,7 +1978,7 @@ static int __init pktsched_init(void) return err; } - register_qdisc(&pfifo_fast_ops); + register_qdisc(&fq_codel_qdisc_ops); register_qdisc(&pfifo_qdisc_ops); register_qdisc(&bfifo_qdisc_ops); register_qdisc(&pfifo_head_drop_qdisc_ops); --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c @@ -709,7 +709,7 @@ static const struct Qdisc_class_ops fq_c .walk = fq_codel_walk, }; -static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = { +struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = { .cl_ops = &fq_codel_class_ops, .id = "fq_codel", .priv_size = sizeof(struct fq_codel_sched_data), @@ -724,6 +724,7 @@ static struct Qdisc_ops fq_codel_qdisc_o .dump_stats = fq_codel_dump_stats, .owner = THIS_MODULE, }; +EXPORT_SYMBOL(fq_codel_qdisc_ops); static int __init fq_codel_module_init(void) { --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -31,7 +31,7 @@ #include <net/dst.h> /* Qdisc to use by default */ -const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops; +const struct Qdisc_ops *default_qdisc_ops = &fq_codel_qdisc_ops; EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ @@ -760,7 +760,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; - const struct Qdisc_ops *ops = default_qdisc_ops; + const struct Qdisc_ops *ops = &fq_codel_qdisc_ops; if (dev->priv_flags & IFF_NO_QUEUE) ops = &noqueue_qdisc_ops;