ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
49 ABTI_UB_ASSERT(ABTI_initialized());
50 ABTI_UB_ASSERT(newbarrier);
52 #ifndef ABT_CONFIG_ENABLE_VER_20_API
57 ABTI_barrier *p_newbarrier;
59 size_t arg_num_waiters = num_waiters;
61 abt_errno =
ABTU_malloc(
sizeof(ABTI_barrier), (
void **)&p_newbarrier);
62 ABTI_CHECK_ERROR(abt_errno);
64 ABTD_spinlock_clear(&p_newbarrier->lock);
65 p_newbarrier->num_waiters = arg_num_waiters;
66 p_newbarrier->counter = 0;
67 ABTI_waitlist_init(&p_newbarrier->waitlist);
69 *newbarrier = ABTI_barrier_get_handle(p_newbarrier);
104 ABTI_UB_ASSERT(ABTI_initialized());
106 ABTI_barrier *p_barrier = ABTI_barrier_get_ptr(barrier);
107 ABTI_CHECK_NULL_BARRIER_PTR(p_barrier);
108 ABTI_UB_ASSERT(p_barrier->counter == 0);
110 size_t arg_num_waiters = num_waiters;
114 if (arg_num_waiters != p_barrier->num_waiters) {
116 p_barrier->num_waiters = arg_num_waiters;
146 ABTI_UB_ASSERT(ABTI_initialized());
147 ABTI_UB_ASSERT(barrier);
150 ABTI_barrier *p_barrier = ABTI_barrier_get_ptr(h_barrier);
151 ABTI_CHECK_NULL_BARRIER_PTR(p_barrier);
156 ABTD_spinlock_acquire(&p_barrier->lock);
159 ABTI_UB_ASSERT(p_barrier->counter == 0);
199 ABTI_UB_ASSERT(ABTI_initialized());
201 ABTI_local *p_local = ABTI_local_get_local();
202 ABTI_barrier *p_barrier = ABTI_barrier_get_ptr(barrier);
203 ABTI_CHECK_NULL_BARRIER_PTR(p_barrier);
205 #ifndef ABT_CONFIG_ENABLE_VER_20_API
207 if (ABTI_IS_ERROR_CHECK_ENABLED && p_local) {
208 ABTI_xstream *p_local_xstream = ABTI_local_get_xstream(p_local);
209 ABTI_CHECK_TRUE(p_local_xstream->p_thread->type &
210 ABTI_THREAD_TYPE_YIELDABLE,
215 ABTD_spinlock_acquire(&p_barrier->lock);
217 ABTI_ASSERT(p_barrier->counter < p_barrier->num_waiters);
218 p_barrier->counter++;
221 if (p_barrier->counter < p_barrier->num_waiters) {
222 ABTI_waitlist_wait_and_unlock(&p_local, &p_barrier->waitlist,
227 ABTI_waitlist_broadcast(p_local, &p_barrier->waitlist);
229 p_barrier->counter = 0;
230 ABTD_spinlock_release(&p_barrier->lock);
260 ABTI_UB_ASSERT(ABTI_initialized());
261 ABTI_UB_ASSERT(num_waiters);
263 ABTI_barrier *p_barrier = ABTI_barrier_get_ptr(barrier);
264 ABTI_CHECK_NULL_BARRIER_PTR(p_barrier);
266 *num_waiters = p_barrier->num_waiters;
#define ABT_ERR_BARRIER
Error code: error related to a barrier.
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following disclaimer
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the following
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN CONTRACT
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license grant
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this license(the "Software") to use
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR IMPLIED
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do so
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS IS
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING FROM
struct ABT_barrier_opaque * ABT_barrier
Barrier handle type.
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
int ABT_barrier_free(ABT_barrier *barrier)
Free a barrier.
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in part
Boost Software License Version Permission is hereby free of charge
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this distribute
#define ABT_SUCCESS
Error code: the routine returns successfully.
#define ABT_ERR_INV_ARG
Error code: invalid user argument.
static void ABTU_free(void *ptr)
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR OTHERWISE
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the Software
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY KIND
Boost Software License Version Permission is hereby granted
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters)
Reinitialize a barrier with a new number of waiters.
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this execute
Boost Software License Version August
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this display
Boost Software License Version Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this reproduce
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier)
Create a new barrier.
int ABT_barrier_wait(ABT_barrier barrier)
Wait on a barrier.
int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
Get the number of waiters of a barrier.