mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 20:14:39 +08:00
* libcsupport/src/assoc.c, libcsupport/src/libio.c, libcsupport/src/write.c: Split files to shrink minimum.exe. Hopefully this will not be deemed necessary to commit to the 4.7 branch. * libcsupport/src/assoclocalbyname.c, libcsupport/src/assoclocalbyremote.c, libcsupport/src/assoclocalbyremotebitfield.c, libcsupport/src/assocnamebylocal.c, libcsupport/src/assocnamebylocalbitfield.c, libcsupport/src/assocnamebyremote.c, libcsupport/src/assocnamebyremotebitfield.c, libcsupport/src/assocptrbylocal.c, libcsupport/src/assocptrbyname.c, libcsupport/src/assocptrbyremote.c, libcsupport/src/assocremotebylocal.c, libcsupport/src/assocremotebylocalbitfield.c, libcsupport/src/assocremotebyname.c, libcsupport/src/libio_init.c, libcsupport/src/write_r.c: New files.
34 lines
530 B
C
34 lines
530 B
C
/*
|
|
* assoc.c
|
|
* rtems assoc routines
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#if HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#define INSIDE_ASSOC
|
|
|
|
#include <rtems.h>
|
|
#include <rtems/assoc.h>
|
|
|
|
#include <string.h> /* strcat, strcmp */
|
|
|
|
|
|
uint32_t rtems_assoc_remote_by_local_bitfield(
|
|
const rtems_assoc_t *ap,
|
|
uint32_t local_value
|
|
)
|
|
{
|
|
uint32_t b;
|
|
uint32_t remote_value = 0;
|
|
|
|
for (b = 1; b; b <<= 1)
|
|
if (b & local_value)
|
|
remote_value |= rtems_assoc_remote_by_local(ap, b);
|
|
|
|
return remote_value;
|
|
}
|