Client/Server example using C++ infrastructure – Client implementation.
Client/Server example using C++ infrastructure – Client implementation.
#include <stdio.h>
#include "shared.h"
int
main()
{
{
printf("Could not get server capability!\n");
return 1;
}
printf("Asking for %d - %d\n", val1, val2);
if (server->sub(val1, val2, &val1))
{
printf("Error talking to server\n");
return 1;
}
printf("Result of subtract call: %d\n", val1);
printf("Asking for -%d\n", val1);
if (server->neg(val1, &val1))
{
printf("Error talking to server\n");
return 1;
}
printf("Result of negate call: %d\n", val1);
return 0;
}
static Env const * env() noexcept
Returns the initial environment for the current task.
L4::Cap< T > get_cap(char const *name, unsigned l) const noexcept
Get the capability selector for the object named name.
bool is_valid() const noexcept
Test whether the capability is a valid capability index (i.e., not L4_INVALID_CAP).
C++ interface for capabilities.
unsigned int l4_uint32_t
Unsigned 32bit value.
Common L4 ABI Data Types.