Skip to content

Commit

Permalink
fix atomic types
Browse files Browse the repository at this point in the history
  • Loading branch information
wismill committed Nov 14, 2024
1 parent a4d2def commit c94e313
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ atom_intern(struct atom_table *table, const char *string, size_t len, bool add)

struct atom_table {
size_t size;
char **strings;
atomic_char **strings;
};

struct atom_table *
Expand Down
5 changes: 5 additions & 0 deletions src/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@
#include "messages-codes.h"
#include "src/utils.h"
#ifdef ENABLE_KEYMAP_CACHE
#include <stdatomic.h>
#include "xkbcomp/cache.h"
#endif

struct xkb_context {
#ifndef ENABLE_KEYMAP_CACHE
int refcnt;
#else
atomic_int refcnt;
#endif

ATTR_PRINTF(3, 0) void (*log_fn)(struct xkb_context *ctx,
enum xkb_log_level level,
Expand Down

0 comments on commit c94e313

Please sign in to comment.