init
This commit is contained in:
45
lib_locks/CHANGELOG.rst
Normal file
45
lib_locks/CHANGELOG.rst
Normal file
@@ -0,0 +1,45 @@
|
||||
lib_locks change log
|
||||
====================
|
||||
|
||||
2.3.1
|
||||
-----
|
||||
|
||||
* CHANGED: Documentation updates
|
||||
|
||||
2.3.0
|
||||
-----
|
||||
|
||||
* CHANGED: Build using XCommon CMake instead of xcommon
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* ADDED: Tests now run on xcore.ai as well as xcore-200
|
||||
* ADDED: Support for XCommon CMake build system
|
||||
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* CHANGED: Use XMOS Public Licence Version 1
|
||||
|
||||
2.0.3
|
||||
-----
|
||||
|
||||
* RESOLVED: Fixed the software locks when using high priority cores
|
||||
|
||||
2.0.2
|
||||
-----
|
||||
|
||||
* CHANGE: Update to source code license and copyright
|
||||
|
||||
2.0.1
|
||||
-----
|
||||
|
||||
* CHANGE: Update to use lock resource macro from the standard library to
|
||||
prevent compile warning
|
||||
|
||||
2.0.0
|
||||
-----
|
||||
|
||||
* CHANGE: Restructured library
|
||||
|
||||
84
lib_locks/LICENSE.rst
Normal file
84
lib_locks/LICENSE.rst
Normal file
@@ -0,0 +1,84 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
58
lib_locks/README.rst
Normal file
58
lib_locks/README.rst
Normal file
@@ -0,0 +1,58 @@
|
||||
:orphan:
|
||||
|
||||
################################
|
||||
lib_locks: Lock handling library
|
||||
################################
|
||||
|
||||
:vendor: XMOS
|
||||
:version: 2.3.1
|
||||
:scope: General Use
|
||||
:description: Lock handling library
|
||||
:category: General Purpose
|
||||
:keywords: hardware locks, software locks, locks
|
||||
:devices: xcore.ai, xcore-200
|
||||
|
||||
********
|
||||
Overview
|
||||
********
|
||||
|
||||
This library provides access to hardware and software locks for use in concurrent C programs. In
|
||||
general it is not safe to use these to marshall within XC due to the assumptions XC makes about
|
||||
safe concurrent data access.
|
||||
|
||||
********
|
||||
Features
|
||||
********
|
||||
|
||||
* Hardware locks: fast and power efficient but there are a limited number per tile
|
||||
* Software locks: slower but an unlimited number can be used
|
||||
|
||||
************
|
||||
Known Issues
|
||||
************
|
||||
|
||||
* None
|
||||
|
||||
**************
|
||||
Required Tools
|
||||
**************
|
||||
|
||||
* XMOS XTC Tools: 15.3.0
|
||||
|
||||
*********************************
|
||||
Required Libraries (dependencies)
|
||||
*********************************
|
||||
|
||||
* None
|
||||
|
||||
*************************
|
||||
Related Application Notes
|
||||
*************************
|
||||
|
||||
* None
|
||||
|
||||
*******
|
||||
Support
|
||||
*******
|
||||
|
||||
This package is supported by XMOS Ltd. Issues can be raised against the software at www.xmos.com/support
|
||||
82
lib_locks/lib_locks/api/hwlock.h
Normal file
82
lib_locks/lib_locks/api/hwlock.h
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#ifndef __hwlock_h_
|
||||
#define __hwlock_h_
|
||||
|
||||
#include <xs1.h>
|
||||
|
||||
#define QUOTEAUX(x) #x
|
||||
#define QUOTE(x) QUOTEAUX(x)
|
||||
|
||||
/** This type represents a hardware lock. */
|
||||
typedef unsigned hwlock_t;
|
||||
|
||||
enum {
|
||||
HWLOCK_NOT_ALLOCATED = 0
|
||||
};
|
||||
|
||||
/** Allocate a hardware lock.
|
||||
*
|
||||
* This function will allocate a new hardware lock from the pool of hardware
|
||||
* locks available on the xCORE. The hardware has a limited number of hardware
|
||||
* locks (for example, current L and S series devices have 4 locks per tile).
|
||||
*
|
||||
* \returns the allocated lock if allocation is successful or the value
|
||||
* ``HWLOCK_NOT_ALLOCATED`` if not.
|
||||
*/
|
||||
inline hwlock_t hwlock_alloc(void)
|
||||
{
|
||||
hwlock_t lock;
|
||||
asm volatile ("getr %0, " QUOTE(XS1_RES_TYPE_LOCK)
|
||||
: "=r" (lock));
|
||||
return lock;
|
||||
}
|
||||
|
||||
/** Free a hardware lock.
|
||||
*
|
||||
* This function frees a given hardware lock and returns it to the
|
||||
* hardware pool to be reallocated elsewhere.
|
||||
*
|
||||
* \param lock the hardware lock to be freed. If this is an invalid lock id or
|
||||
* not an currently allocated lock then the function will trap.
|
||||
*/
|
||||
inline void hwlock_free(hwlock_t lock)
|
||||
{
|
||||
asm volatile ("freer res[%0]"
|
||||
: /* no output */
|
||||
: "r" (lock));
|
||||
}
|
||||
|
||||
/** Acquire a hardware lock.
|
||||
*
|
||||
* This function acquires a lock for the current logical core. If
|
||||
* another core holds the lock the function will pause until the
|
||||
* lock is released.
|
||||
*
|
||||
* \param lock the hardware lock to acquire
|
||||
*/
|
||||
inline void hwlock_acquire(hwlock_t lock)
|
||||
{
|
||||
asm volatile ("in %0, res[%0]"
|
||||
: /* no output */
|
||||
: "r" (lock)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
/** Release a hardware lock.
|
||||
*
|
||||
* This function releases a lock from the current logical core. The lock should
|
||||
* have been previously claimed by hwlock_acquire().
|
||||
*
|
||||
* \param lock the hardware lock to release
|
||||
*/
|
||||
inline void hwlock_release(hwlock_t lock)
|
||||
{
|
||||
asm volatile ("out res[%0], %0"
|
||||
: /* no output */
|
||||
: "r" (lock)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif // __hwlock_h_
|
||||
67
lib_locks/lib_locks/api/swlock.h
Normal file
67
lib_locks/lib_locks/api/swlock.h
Normal file
@@ -0,0 +1,67 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#ifndef __swlock_h_
|
||||
#define __swlock_h_
|
||||
#include <xccompat.h>
|
||||
|
||||
/** Type that represents a software lock */
|
||||
typedef unsigned swlock_t;
|
||||
|
||||
/** This define should be used to initialize a software lock e.g.
|
||||
|
||||
\code
|
||||
swlock_t my_lock = SWLOCK_INITIAL_VALUE;
|
||||
\endcode
|
||||
|
||||
If you intialize this way there is no need to call swlock_init().
|
||||
*/
|
||||
#define SWLOCK_INITIAL_VALUE 0
|
||||
|
||||
enum {
|
||||
SWLOCK_NOT_ACQUIRED = 0
|
||||
};
|
||||
|
||||
/** Initialize a software lock.
|
||||
*
|
||||
* This function will initialize a software lock for use. Note that unlike
|
||||
* hardware locks, there is no need to allocate or free a software lock from a
|
||||
* limited pool.
|
||||
*/
|
||||
void swlock_init(REFERENCE_PARAM(swlock_t, lock));
|
||||
|
||||
/** Try and acquire a software lock.
|
||||
*
|
||||
* This function tries to acquire a lock for the current logical core.
|
||||
* If another core holds the lock then the function will fail and return.
|
||||
*
|
||||
* \param lock the software lock to acquire.
|
||||
*
|
||||
* \returns a value that is equal to ``SWLOCK_NOT_ACQUIRED`` if
|
||||
* the attempt fails. Any other value indicates that the
|
||||
* acquisition has succeeded.
|
||||
*/
|
||||
int swlock_try_acquire(REFERENCE_PARAM(swlock_t, lock));
|
||||
|
||||
/** Acquire a software lock.
|
||||
*
|
||||
* This function acquires a lock for the current logical core.
|
||||
* If another core holds the lock then the function will wait until
|
||||
* it becomes available.
|
||||
*
|
||||
* \param lock the software lock to acquire.
|
||||
*
|
||||
*/
|
||||
void swlock_acquire(REFERENCE_PARAM(swlock_t, lock));
|
||||
|
||||
/** Release a software lock.
|
||||
*
|
||||
* This function releases a previously acquired software lock for other cores
|
||||
* to use.
|
||||
*
|
||||
* \param lock the software lock to release.
|
||||
*
|
||||
*/
|
||||
void swlock_release(REFERENCE_PARAM(swlock_t, lock));
|
||||
|
||||
#endif // __swlock_h_
|
||||
6
lib_locks/lib_locks/lib_build_info.cmake
Normal file
6
lib_locks/lib_locks/lib_build_info.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
set(LIB_NAME lib_locks)
|
||||
set(LIB_VERSION 2.3.1)
|
||||
set(LIB_INCLUDES api)
|
||||
set(LIB_DEPENDENT_MODULES "")
|
||||
|
||||
XMOS_REGISTER_MODULE()
|
||||
12
lib_locks/lib_locks/module_build_info
Normal file
12
lib_locks/lib_locks/module_build_info
Normal file
@@ -0,0 +1,12 @@
|
||||
# You can set flags specifically for your module by using the MODULE_XCC_FLAGS
|
||||
# variable. So the following
|
||||
#
|
||||
# MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3
|
||||
#
|
||||
# specifies that everything in the modules should have the application
|
||||
# build flags with -O3 appended (so the files will build at
|
||||
# optimization level -O3).
|
||||
#
|
||||
# You can also set MODULE_XCC_C_FLAGS, MODULE_XCC_XC_FLAGS etc..
|
||||
|
||||
VERSION = 2.3.1
|
||||
8
lib_locks/lib_locks/src/hwlock.c
Normal file
8
lib_locks/lib_locks/src/hwlock.c
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include "hwlock.h"
|
||||
|
||||
extern inline hwlock_t hwlock_alloc(void);
|
||||
extern inline void hwlock_free(hwlock_t lock);
|
||||
extern inline void hwlock_acquire(hwlock_t lock);
|
||||
extern inline void hwlock_release(hwlock_t lock);
|
||||
28
lib_locks/lib_locks/src/swlock.c
Normal file
28
lib_locks/lib_locks/src/swlock.c
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2014-2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#include "swlock.h"
|
||||
|
||||
void swlock_init(swlock_t *_lock)
|
||||
{
|
||||
volatile swlock_t *lock = _lock;
|
||||
*lock = 0;
|
||||
}
|
||||
|
||||
extern int swlock_try_acquire(swlock_t *lock);
|
||||
|
||||
void swlock_acquire(swlock_t *lock)
|
||||
{
|
||||
int value;
|
||||
do {
|
||||
value = swlock_try_acquire(lock);
|
||||
}
|
||||
while (value == SWLOCK_NOT_ACQUIRED);
|
||||
}
|
||||
|
||||
void swlock_release(swlock_t *lock)
|
||||
{
|
||||
*lock = 0;
|
||||
}
|
||||
|
||||
|
||||
44
lib_locks/lib_locks/src/swlock_asm.S
Normal file
44
lib_locks/lib_locks/src/swlock_asm.S
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
.file "swlock_asm.S"
|
||||
.text
|
||||
.cc_top swlock_try_acquire.function
|
||||
.align 4
|
||||
.globl swlock_try_acquire
|
||||
.globl swlock_try_acquire.nstackwords
|
||||
.globl swlock_try_acquire.maxthreads
|
||||
.globl swlock_try_acquire.maxtimers
|
||||
.globl swlock_try_acquire.maxchanends
|
||||
.type swlock_try_acquire, @function
|
||||
.set swlock_try_acquire.locnochandec, 1
|
||||
.set swlock_try_acquire.nstackwords, 0
|
||||
swlock_try_acquire:
|
||||
ENTSP_lu6 0
|
||||
get r11, id
|
||||
add r11, r11, 1
|
||||
ldw r1, r0[0] // Get the current mutex value.
|
||||
bt r1, .Lfailed // Check if it is already claimed.
|
||||
stw r11, r0[0] // Claim it.
|
||||
#if !defined(__XS1B__)
|
||||
// On XS2 a high priority core needs to ensure that a low priority core
|
||||
// has executed the store before we load
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
#endif
|
||||
nop
|
||||
ldw r2, r0[0] // Reload the mutex.
|
||||
eq r0, r11, r2 // If the value hasn't changed we've claimed the
|
||||
retsp 0 // mutex.
|
||||
.Lfailed:
|
||||
ldc r0, 0
|
||||
retsp 0
|
||||
.size swlock_try_acquire, .-swlock_try_acquire
|
||||
.cc_bottom swlock_try_acquire.function
|
||||
.set swlock_try_acquire.maxchanends, 0
|
||||
.set swlock_try_acquire.maxtimers, 0
|
||||
.set swlock_try_acquire.maxthreads, 1
|
||||
3
lib_locks/lib_locks/wscript
Normal file
3
lib_locks/lib_locks/wscript
Normal file
@@ -0,0 +1,3 @@
|
||||
def use_module(bld):
|
||||
source = bld.path.ant_glob('src/*')
|
||||
bld.module(source=source, includes=['api'], version='2.0.3')
|
||||
Reference in New Issue
Block a user