/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Copyright (c) 2015-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
void *heap;
/* Segment must be mapped at this address, or no supper */
- u64 ssvm_va;
+ uword ssvm_va;
/* The actual mmap size */
- u64 ssvm_size;
+ uword ssvm_size;
u32 master_pid;
u32 slave_pid;
u8 *name;
return;
}
- while (__sync_lock_test_and_set (&h->lock, 1))
+ while (clib_atomic_test_and_set (&h->lock))
;
h->owner_pid = my_pid;
always_inline void
ssvm_lock_non_recursive (ssvm_shared_header_t * h, u32 tag)
{
- while (__sync_lock_test_and_set (&h->lock, 1))
+ while (clib_atomic_test_and_set (&h->lock))
;
h->tag = tag;