18eb8bab992e3998c33770b0cdb16059a8b918a06sewardj/* Test for lwp_kill syscall which is available on illumos 28eb8bab992e3998c33770b0cdb16059a8b918a06sewardj and Solaris 11 and 11.1. This syscall has been renamed 38eb8bab992e3998c33770b0cdb16059a8b918a06sewardj on Solaris 11.2 to lwp_sigqueue and extra parameters added. 48eb8bab992e3998c33770b0cdb16059a8b918a06sewardj */ 58eb8bab992e3998c33770b0cdb16059a8b918a06sewardj 68eb8bab992e3998c33770b0cdb16059a8b918a06sewardj#include "scalar.h" 78eb8bab992e3998c33770b0cdb16059a8b918a06sewardj 88eb8bab992e3998c33770b0cdb16059a8b918a06sewardjint main(void) 98eb8bab992e3998c33770b0cdb16059a8b918a06sewardj{ 108eb8bab992e3998c33770b0cdb16059a8b918a06sewardj /* Uninitialised, but we know px[0] is 0x0. */ 118eb8bab992e3998c33770b0cdb16059a8b918a06sewardj long *px = malloc(sizeof(long)); 128eb8bab992e3998c33770b0cdb16059a8b918a06sewardj x0 = px[0]; 138eb8bab992e3998c33770b0cdb16059a8b918a06sewardj 148eb8bab992e3998c33770b0cdb16059a8b918a06sewardj /* SYS_lwp_kill 163 */ 158eb8bab992e3998c33770b0cdb16059a8b918a06sewardj GO(SYS_lwp_kill, "2s 0m"); 168eb8bab992e3998c33770b0cdb16059a8b918a06sewardj SY(SYS_lwp_kill, x0 - 1, x0); FAIL; 178eb8bab992e3998c33770b0cdb16059a8b918a06sewardj 188eb8bab992e3998c33770b0cdb16059a8b918a06sewardj return 0; 198eb8bab992e3998c33770b0cdb16059a8b918a06sewardj} 208eb8bab992e3998c33770b0cdb16059a8b918a06sewardj 21