Lines Matching defs:error
356 int indx, error;
384 error = copyinstr(uap->name, pnbuf, MAXPATHLEN, &pathlen);
385 if (error) {
390 error = ENAMETOOLONG;
399 error = EINVAL;
403 error = EINVAL;
419 error = psem_cache_search(&pinfo, &nd, &pcache);
421 if (error == ENOENT) {
423 error = EINVAL;
427 if (!error) {
434 error = falloc(p, &nfp, &indx, vfs_context_current());
435 if (error)
451 error = EEXIST;
462 error = EINVAL;
468 error = ENOSPC;
494 error = mac_posixsem_check_create(kauth_cred_get(), nameptr);
495 if (error) {
505 error = ENOENT;
510 error = ENOENT;
516 error = mac_posixsem_check_open(kauth_cred_get(), pinfo);
517 if (error) {
522 if ( (error = psem_access(pinfo, fmode, kauth_cred_get())) ) {
530 error = ENOSPC;
541 error = ENOMEM;
548 if ( (error = psem_cache_add(pinfo, &nd, pcp)) ) {
575 error = ENOMEM;
578 error = EACCES;
581 error = EINVAL;
596 return (error);
644 int error=0;
661 error = copyinstr(uap->name, pnbuf, MAXPATHLEN, &pathlen);
662 if (error) {
667 error = ENAMETOOLONG;
677 error = EINVAL;
681 error = EINVAL;
697 error = psem_cache_search(&pinfo, &nd, &pcache);
699 if (error == ENOENT) {
701 error = EINVAL;
705 if (!error) {
707 error = EINVAL;
712 error = mac_posixsem_check_unlink(kauth_cred_get(), pinfo, nameptr);
713 if (error) {
718 if ( (error = psem_access(pinfo, pinfo->psem_mode, kauth_cred_get())) ) {
725 error = EINVAL;
731 error = 0;
750 error = 0;
753 return (error);
761 int error = 0;
766 error = fp_lookup(p,fd, &fp, 1);
767 if (error) {
769 return(error);
773 error = closef_locked(fp, fp->f_fglob, p);
776 return(error);
794 int error;
796 error = fp_getfpsem(p, fd, &fp, &pnode);
797 if (error)
798 return (error);
800 error = EINVAL;
806 error = EINVAL;
812 error = EINVAL;
816 error = mac_posixsem_check_wait(kauth_cred_get(), pinfo);
817 if (error) {
827 error = EACCES;
831 error = EINTR;
834 error = 0;
837 error = EINVAL;
842 return(error);
855 int error;
857 error = fp_getfpsem(p, fd, &fp, &pnode);
858 if (error)
859 return (error);
861 error = EINVAL;
867 error = EINVAL;
873 error = EINVAL;
877 error = mac_posixsem_check_wait(kauth_cred_get(), pinfo);
878 if (error) {
891 error = EINVAL;
894 error = EINTR;
897 error = EAGAIN;
900 error = 0;
903 error = EINVAL;
908 return(error);
919 int error;
921 error = fp_getfpsem(p, fd, &fp, &pnode);
922 if (error)
923 return (error);
925 error = EINVAL;
931 error = EINVAL;
937 error = EINVAL;
941 error = mac_posixsem_check_post(kauth_cred_get(), pinfo);
942 if (error) {
952 error = EINVAL;
956 error = EINTR;
959 error = 0;
962 error = EINVAL;
967 return(error);
991 int error=0;
1014 error = psem_delete(pinfo);
1021 return (error);
1027 int error;
1033 error = psem_close(((struct psemnode *)fg->fg_data), fg->fg_flag);
1035 return(error);